On 09/04/14 11:10, jcup...@gmail.com wrote: > You can imagine it being useful in the other direction too: you could > get maybe get binary image data out of NumPy and into cairo with fewer > copies.
That's actually how we do it in another project [1]. I create an empty NumPy array and pass the underlying C array to GObject method that fills it. This in fact does not require a memcpy but turns the data transfer semantic upside down. Oh, and it assumes that the NumPy internals stay like that ... Regards, Matthias [1] https://github.com/ufo-kit/concert/blob/master/concert/devices/cameras/uca.py#L182-L186 -- Matthias Vogelgesang | bloerg.net _______________________________________________ python-hackers-list mailing list python-hackers-list@gnome.org https://mail.gnome.org/mailman/listinfo/python-hackers-list