[Numpy-discussion] f2py changed ?

Charles Doutriaux doutriaux1@llnl....
Tue Mar 25 14:45:31 CDT 2008


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 = 
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)
"/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