On Wed, 01 Oct 2003 14:39:27 -0600 Joe Van Andel <[EMAIL PROTECTED]> wrote:
> Has anyone used SIP to build C++ extensions that accept Numeric arrays > as arguments, and return Numeric arrays? > > I've found the PyQwt package that converts Numeric arrays to > QwtArray's. This is a good start, but I also need to code extensions > that return Numeric arrays. > > If so, could you share a sample of your code (and .sip files)? > I never did, but you can trick sip into returning any kind of Python object as shown in the attached file (this code returns VTK Python extension objects). Pointers to classes that should not be handled by sip are replaced by pointers to void. This implies that you have provide %MemberCode to do the interfacing yourself. Beware, you have to patch sip's output to import the Numerical Python extensions. If you don't get it working, send me a very simple example and I'll wrap it for you. Gerard
renderwindow.sip
Description: Binary data