[PyQt] Passing numpy arrays into SIP bindings for C++/Qt code
Phil Thompson
phil at riverbankcomputing.com
Wed Sep 16 07:19:24 BST 2015
On 16/09/2015 5:40 am, John Wainwright GMail wrote:
> Hi all. I’m very happily using PyQt for a large astrophotography
> project and have augmented it with a number of C++/Qt extensions using
> SIP. I’d like to be able to pass numpy arrays into (and out of) the
> C++ extensions via SIP bindings and wondering if anyone as done this
> before or if there are any suggestions for best approaches.
You should be able to define appropriate %MappedTypes and make sure all
access to the NumPy objects is done via the buffer protocol.
Phil
More information about the PyQt
mailing list