[SciPy-user] swig+numeric+typemaps

David Grant david at dwavesys.com
Tue Nov 9 16:44:51 CST 2004

David Grant wrote:

> I've found several references from exhaustive google searching which 
> indicates that this code is out of date and needs updating, but no one 
> has done it yet.
> I found this: https://geodoc.uchicago.edu/climatewiki/SwigTypemaps 
> which is cool.  I got it working right away.
> Now, I only wonder if it will work with complex numbers and other 
> situations... I expect problems, but maybe NumPtr will surprise me!

Hmm, well I can't pass a Numeric array of complex type (isn't allowed by 
NumPtr) but I can write a wrapper in C++ around my code which will 
receive the pure real part and pure imaginary part, then I can combine 
them.  I think I'd have to do this anyways, to get the data massaged 
into the form that my C++ classes need.

More information about the SciPy-user mailing list