[Numpy-discussion] Anyone have a well-tested SWIG-based C++ STL valarray <=> numpy.array typemap to share?
Russell E. Owen
Wed Sep 5 12:31:46 CDT 2007
In article <4CED078D-B8C7-4917-B0DE-4ED60BDFE015@sandia.gov>,
"Bill Spotz" <email@example.com> wrote:
> I have been considering adding some C++ STL support to numpy/doc/swig/
> numpy.i. Probably std::vector<TYPE> <=> PyArrayObject (and some
> std::complex<TYPE> support as well). Is this what you had in mind?
That sounds very useful, but how did you get it to work? std::vectors
are resizable and numpy arrays are not. However, much of the time I want
std::vectors of a particular size -- in which case numpy would be a
(Speaking of which, do you happen to know of any good std::vector
variant that has fixed length?)
More information about the Numpy-discussion