[Numpy-discussion] calling a f2py made module with numarray (mem shared with numpy ?)
Sebastian Haase
haase at msg.ucsf.edu
Wed Jul 19 00:04:47 EDT 2006
Hi,
Having to use Fortran again, I had a look at f2py ..
I looks really great !! Everything seems to run out of the box !!
Thanks a lot !
I think I tried
intend(inout) <some array> and then fed in an array object that really
was an numarray as opposed to a numpy array.
I was surprised that the array did not get altered by the function !
If I assign numpyArray = numpy.asarray(numarrayArr)
don't numpyArray and numarrayArr share identical memory for their data?
Another observation I made was that a C-contiguous array of rank 2 was
not accepted by 'intend(inout)' (the error message said that it had to
be FORTRAN-contiguous - as opposed to the f2py documentation I read online
http://cens.ioc.ee/projects/f2py2e/usersguide/index.html#attributes
which says : fortran OR c contiguous )
Thanks for another great tool !
Sebastian Haase
More information about the NumPy-Discussion
mailing list