[Numpy-discussion] Anyone have a well-tested SWIG-based C++ STL valarray <=> numpy.array typemap to share?

Philip Austin paustin@eos.ubc...
Wed Sep 5 16:32:13 CDT 2007


Christopher Barker writes:
 > 
 > I've seen that -- it does look like all we'd need is the header.
 > 
 > So, can one:
 > 
 >   - create a Multiarray from an existing data pointer?
 > 
 >   - get the data pointer for an existing Multiarray?
 > 
 > I think that's what I'd need to make the numpy array <-> Multiarray 
 > transition without any copying.

Albert Strasheim has done some work on this:
 http://thread.gmane.org/gmane.comp.python.c++/11559/focus=11560


 > 
 > ( I know those are really questions that are best asked on the boost 
 > list, and should be in the docs, but you folks are so helpful...)
 > 
 > Maybe this is the class to wrap with the array interface, though maybe 
 > that's exactly what Boost::python::array does (though, AFAICT, still not 
 > for numpy).
 > 



More information about the Numpy-discussion mailing list