On Fri, Aug 28, 2009 at 3:29 PM, Dag Sverre Seljebotn < [email protected]> wrote:
> Two answers: > 1) In about half a year, there will likely be a released version of Cython > with built in capability to do this kind of wrapping. > This is awesome! > > 2) NumPy NumPy NumPy! Doing this without using NumPy is a waste of time > IMO. Use the PyArray_New... function in the C api to create array backed by > your C struct. (I remember posting a howto to Jon Olav Vik here on the list > around June). > > No can do. Or better yet, yes could do, but the whole point here is that my MatrixFloat gimmick is all a big test for something a lot more complicated and generalized, where Numpy wouldn't be useful at all. Let's just say that I'm using this "project" to wrap my mind around this whole (and for me new) world of wrapping and exposing and whatnot, and being a matrix class something pretty easy to set up (in a fairly basic way anyway) I choose to implement this. I've looked at numpy for some inspiration though, both docs and source code, but there are not a lot of useful things in it that could be useful in this context too, I'm afraid.
_______________________________________________ Cython-dev mailing list [email protected] http://codespeak.net/mailman/listinfo/cython-dev
