James Henstridge writes:
> How does this buffer interface relate to numeric python arrays? Numpy
> arrays sound like a useful way of passing buffers round. You can get the
> array to use the data from another your t1python's internal structures.
I've never used NumPy, and would hate to introduce a new
dependency. Buffer objects and the buffer C interface have the
advantage of being part of the Python core.
> As for keeping things consistent, it looks like you can get the numpy
> array to keep a reference to the t1python structure, so that the array
> data is not freed while the array is still in use, by setting the
Cool; fortunately, you can do this with buffer objects as well.
> I am going to write wrappers for some of the gdkrgb functions for pygtk,
> and will include numpy versions that can render from a numpy array (if
> numpy is available). This would remove most the array copying from the
Based on Mark Hammond's message, it sounds like we should all the
using the buffer type/interface. Does NumPy implement it?
> Of course, I may have misunderstood what you want this buffer interface to
> do. If so, could you point out what features you are after that aren't
> provided by numpy?
Sounds like you got it right!
-Fred
--
Fred L. Drake, Jr. <[EMAIL PROTECTED]>
Corporation for National Research Initiatives
To unsubscribe: echo "unsubscribe" | mail [EMAIL PROTECTED]