Pass numeric arrays from C extensions to Python

Terry Reedy tjreedy at udel.edu
Sun Sep 23 22:48:11 EDT 2012


On 9/23/2012 9:39 PM, JBT wrote:
> Hi,
>
> I am looking for a way to pass numeric arrays, such as *float a[100];
> double b[200];*, from C extension codes to python. The use case of
> this problem is that you have data stored in a particular format,
> NASA common data format (CDF) in my case, and there exists an
> official C library to read/create/edit such data, and you want to do
> data analysis in python. The problem comes down to how to feed the
> data into python.
>
> I did some googling, but so far no luck. Can anyone help me? Thank
> you very much.

I would look into numpy and scipy.

-- 
Terry Jan Reedy




More information about the Python-list mailing list