[SciPy-user] scipy.f2py and Numeric arrays

Travis Oliphant oliphant at ee.byu.edu
Wed Nov 9 13:15:02 CST 2005

Chris Fonnesbeck wrote:

>It appears that passing Numeric arrays to extensions built with
>scipy.f2py do not work.
>(Pdb) _poisson(x,mu)          <==== These arguments are Numeric arrays
>Out[2]: nan
>(Pdb) _poisson(scipy.array(x),scipy.array(mu))
>Out[2]: -146.43360900878906
>(Pdb) _poisson(x.tolist(),mu.tolist())
>Out[2]: -146.43360900878906
>Is this intended behaviour? I still need to be able to use Numeric
>arrays until scipy_core becomes more stable.
Yes, scipy.f2py does not support Numeric anymore, directly.  However, a 
Numeric array should still be converted properly to a scipy array under 
the covers.  So, this looks like a bug.


More information about the SciPy-user mailing list