[Cython] Array parameter...
Magnus Lie Hetland
magnus at hetland.org
Fri Jan 2 22:31:32 CET 2009
On Jan 2, 2009, at 22:11 , Robert Bradshaw wrote:
> The standard way to do things now is to write a cdef function that
> takes a double* and length argument, then write a python wrapper for
> testing.
Yeah, that's what I had planned. Sounds like a good solution, I guess.
(Now I just need a naming convention to separate the two ;-)
> You could also look at using NumPy arrays with the buffer
> interface, depending on what you're doing.
Indeed. I played with that a bit; it might be the best bet, perhaps
(although sticking with only Cython has the advantage that I can ship
the generated C code, and the user needn't install anything beyond
Python).
--
Magnus Lie Hetland
http://hetland.org
More information about the Cython-dev
mailing list