[Numpy-discussion] f2py changed ?
Charles Doutriaux
doutriaux1 at llnl.gov
Tue Mar 25 15:45:31 EDT 2008
Hello,
I have an f2py module that used to work great, now it breaks,
first of all the setup.py extension used to have:
# f2py_options = ["--fcompiler=gfortran",],
I now need to comment this out, and hope it picks up the right compiler...
at the beg of the script I have a line from the autoconvert:
import numpy.oldnumeric as Numeric
when running I get:
variable =
_gengridzmean.as_column_major_storage(Numeric.transpose(variable.astype
(Numeric.Float32).filled(0)))
AttributeError: 'module' object has no attribute 'as_column_major_storage'
I tried to go around that by using straight numpy calls everywhere and
using numpy.asfortranarray instead
But now it collapse a bit further:
res = ZonalMeans.compute(s)
File
"/lgm/cdat/latest/lib/python2.5/site-packages/ZonalMeans/zmean.py", line
397, in compute
bandlat) #,imt,jmt,kmt,nt,kmt_grid,iomax,vl)
_gengridzmean.error: failed in converting 5th argument `mask' of
_gengridzmean.zonebasin to C/Fortran array
I checked all my arrays are treated with asfortranarray and even
ascontiguousarray to be sure!
I believe this used to work after converting to numpy
More information about the NumPy-Discussion
mailing list