> 3) Just an overall comment: I personally think NumPy arrays are > excellent for this. I'd have no problems personally with using a NumPy > array only in order to allocate memory and then pass that memory on to a > C library for instance. (The problem is, I suppose, having to depend on > the NumPy library...though investing effort in creating a garbage > collected array type when NumPy already has that seems too much like > reinventing the wheel to me.) This will become more convenient than > today if Cython grows better NumPy support. >
One more thought: In Python 3000, the "buffer" interface is going to put a standard on array objects for buffer interchange between any Python library: http://www.python.org/dev/peps/pep-3118/ Introducing a convenient syntax for C arrays (or our own, Invented Here, garbage collected array type) would mean lots of code incompatible with this API is written. (Which might be fine in most cases; but I'd rather not have to _think_ too much when writing Cython code, ie "do I need this type of array or this type", I'd rather just always use one array type that does it all.) Having the de facto array for Cython code being NumPy arrays conveniently solves this problem, as NumPy will implement that API. One could add through convenient wrapper functions and typedefs etc. Remember, having functionality available doesn't automatically mean "heavy". Dag Sverre _______________________________________________ Cython-dev mailing list Cython-dev@codespeak.net http://codespeak.net/mailman/listinfo/cython-dev