T J wrote:
> Can Cython's buffer interface work with the 'array' module in Python's
> standard library?  I need a growable array of floats and would like to
> do some computations on them.  Converting to a NumPy array before
> computation is one option, but if I can write a cython function which
> can access those elements directly, this seems like a better route.
> If this is possible, can someone provide a quick example?

There's some support here:

http://trac.cython.org/cython_trac/ticket/314

Search for the related email discussion for examples if they are not in 
the patches.

However, this is exactly the same as using NumPy arrays (with the 
[dtype, ndim]-notation). You don't gain anything except that your code 
will also work without NumPy installed.

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

Reply via email to