John Hunter wrote:
>>>>>>"Travis" == Travis Oliphant <oliphant at ee.byu.edu> writes:
>>>>>>>>>>>>> Travis> All of these seem to define their own objects which are
> Travis> basically just interpretations of chunks of memory. At
> Travis> one time, we might have said "these should all be
> Travis> sub-classes of the ndarray". Now, we are thinking more
>>What about blitting pixel buffers from mpl or chaco agg into various
>GUI windows, GTK, Tk, WX, etc.... This seems like a ready made case
>for the array interface. I could pipe in with an example like this if
>it would help.
>>Somebody mentioned something like this, but another example would
help. The thread degenerated into a discussion of how RGBA is often
different so you "can't share memory" anyway.
I think what is being missed is that you would set up the NumPy array in
the correct memory layout for whatever the blitting code you are using
expects and then could do processing with arrays and then write them to
the screen directly from the NumPy array (rather than going through a
string) or using an attribute lookup to use the array interface.
So, an example of how you "calculate with NumPy" and then "blit to the
screen" the result would be very helpful.
-Travis