[Numpy-discussion] using numpy array data in C++ matrix template library (MTL) matrices

Neal Becker ndbecker2@gmail....
Tue Apr 7 17:53:25 CDT 2009


JJ wrote:

> 
> Hello:
> I would like to make a numpy array accessible in C++ as a matrix template
> library (MTL) matrix object.  Has anyone done this before?  I see that
> there is a project numpy_boost that will make numpy arrays accessible as
> boost::multi_array objects.  Any ideas on how I might do this, or even
> better, a simple example of passing a numpy array to C++, accessing it in
> a MatrixRow container, changing one element, and then passing it back to
> python/numpy?  I'm a novice C++ programmer, so bear with me. Thanks John

I've used boost::python to interface to several different c++ matrix 
template libs.  My preferred approach now is pyublas.




More information about the Numpy-discussion mailing list