On Thu, Mar 20, 2008 at 1:35 PM, Dag Sverre Seljebotn
<[EMAIL PROTECTED]> wrote:
> > So if I have an array, do I have always to do something like this?
>
>  You can consider using NumPy arrays. Then you construct a NumPy array the
>  Python way, and only access it's internal buffer from Cython, meaning that
>  you always have a full, valid Python object. NumPy contains methods for
>  converting that array to a list if you need to (but it is more efficient
>  to simply use the array in your Python code).
>
>  http://new.scipy.org/Wiki/Cookbook/Pyrex_and_NumPy
>
>
>  Dag Sverre


This seems a very sensible suggestion.
I can keep it as a NumPy array, no need to convert it to a list.

Thanks Dag.

Francesco
_______________________________________________
Cython-dev mailing list
[email protected]
http://codespeak.net/mailman/listinfo/cython-dev

Reply via email to