Hello,
I'm a newbie to cython, but the numpy buffer support has convinced me
to start using it (moving from interfacing c++ code using blitz++ to
handle the numpy arrays, then wrapping the code with weave), and so
far I love it. Cython is really a great piece of work.
My question -- which probably has as much to do with cython internals
as anything else -- is about the best way to pass ndarray buffer
objects between functions. For instance, I'd like to do this:
cimport numpy as cnp
cdef void foo(cnp.ndarray[float] X):
...
but currently I believe I either have to do
cdef void foo(object Xarg):
cnp.ndarray[float] X = Xarg
....
or
def void foo(cnp.ndarray[float] X):
...
both of which seem to be far from the most efficient way to do things.
Would one method be better than the other? Are there plans to drop
this constraint in the future?
Thanks!
--Hoyt
--
+++++++++++++++++++++++++++++++++++
Hoyt Koepke
UBC Department of Computer Science
http://www.cs.ubc.ca/~hoytak/
[EMAIL PROTECTED]
+++++++++++++++++++++++++++++++++++
_______________________________________________
Cython-dev mailing list
[email protected]
http://codespeak.net/mailman/listinfo/cython-dev