[SciPy-user] passings arrays into C extension

Andrew Straw strawman at astraw.com
Fri Dec 2 16:17:02 EST 2005


The best way (IMO) is to use the __array_struct__ interface: it's pretty
fast, it's portable across Numeric, numarray (will be, anyway), and
scipy core. See http://numeric.scipy.org/array_interface.html for more
information.

mike cantor wrote:

>Hi,
>
>What is the blessed way to pass SciPy arrays into C extension code (that 
>is, to convert Array PthonObjs into a C int* or other array type).
>
>This is probably in documentation that I couldn't find somewhere and if 
>that's the case I just need a pointer to it.
>
>Thanks,
>-mike
>
>
>_______________________________________________
>SciPy-user mailing list
>SciPy-user at scipy.net
>http://www.scipy.net/mailman/listinfo/scipy-user
>  
>




More information about the SciPy-User mailing list