Skip to content

A small example of using boost.python, boost.numpy and the C++ Eigen matrix library together

Notifications You must be signed in to change notification settings

paroj/boost_numpy_eigen

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

28 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

This is a simple example on how to use boost.python to call c++ code from python and convert numpy arrays to Eigen.

To run (assuming you've boost.python already installed):

cmake .
make hello
python hello.py
make test_eigen_numpy_mod
python test_eigen_numpy.py

Links

http://eigen.tuxfamily.org/index.php?title=Main_Page

There also is the 'ndarray' project, that aims at providing a multidimensionnal array library similar to numpy.ndarray for C++. Some of the code comes from ndarray : https://github.com/ndarray/ndarray

TODO

  • The from python converts do some data copy. This could hurt for big matrices

About

A small example of using boost.python, boost.numpy and the C++ Eigen matrix library together

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C++ 53.6%
  • CMake 35.5%
  • Python 9.9%
  • C 1.0%