C API: array of floats/ints from python to C and back

Scott David Daniels Scott.Daniels at Acm.Org
Sun Dec 28 01:06:42 CET 2008

Daniel Fetchinson wrote:
>.... I have a list to begin with which will be passed to the C function.
 > I assume converting the list to an array.array and passing that to the C
> function doesn't make any difference in terms of speed since the
> operation itself will be done in the C function anyway.

Right, but why bother to do the conversion in C where you'll have to
fiddle with refcounts and error propogation?  convert in python, and
go to the underlying data in C.

--Scott David Daniels
Scott.Daniels at Acm.Org

More information about the Python-list mailing list