[SciPy-user] scipy.f2py and Numeric arrays
Chris Fonnesbeck
fonnesbeck at gmail.com
Thu Nov 10 14:35:53 EST 2005
On 11/9/05, Travis Oliphant <oliphant at ee.byu.edu> wrote:
> 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.
> >
> >
> This was a bug in the new array_struct array interface that was just
> recently added. It has been fixed now in SciPy SVN.
>
Just updated from svn. When I try and pass Numeric arrays I get a type error:
TypeError: array cannot be safely cast to required type
Thanks,
C.
--
Chris Fonnesbeck
Atlanta, GA
More information about the SciPy-User
mailing list