**EigenPy** is an open source framework which allows to bind the famous [Eigen](http://eigen.tuxfamily.org) in Python as NumPy object (as matrix or array).
**EigenPy** also exposes the Geometry module of Eigen for easy code prototyping.
**EigenPy** also supports the basic matrix decomposion routines of Eigen such as the Cholesky decomposition, SVD decomposition, QR decomposition, and etc.
Before compiling this package, make sure to have initialized all git
submodules of this repo. To initialize the submodules when cloning the
repo, use:
## Setup
```bash
git clone --recursive <git_url>
```
To compile this package, it is recommended to create a separate build
directory:
mkdir _build
cd _build
cmake [OPTIONS] ..
make install
The installation of **EigenPy** on your computer is made easy for Linux/BSD and Mac OS X environments.
Please note that CMake produces a `CMakeCache.txt` file which should
be deleted to reconfigure a package from scratch.
### Ubuntu
#### Compiling for python3 on macOS
You can easily install **EigenPy** from binairies.
Make sure you have boost for python3 installed. If you use homebrew, you can install it via `brew install boost-python3`.
#### Add robotpkg apt repository
Assuming you have python2 and python3 installed on your system, you can compile for python3 using
1. Check your distribution codename in a terminal with the following command:
4. You need to run at least once apt update to fetch the package descriptions:
```
sudo apt-get update
```
#### Install EigenPy
5. The installation of **EigenPy** and its dependencies is made through the line:
For Python 2.7
```
sudo apt install robotpkg-py27-eigenpy
```
or for Python 3.{5,6,7}
```
cmake -DPYTHON_EXECUTABLE=`which python3` ..
sudo apt install robotpkg-py35-eigenpy
```
where 35 should be replaced by the python 3 you want to work this (e.g. `robotpkg-py36-eigenpy` to work with Python 3.6).
In case you get an error as only the libraries for python2 are found, make sure macOS can find the python3 libraries. One way to ensure this is by adding a symbolic link to the python3 libraries like
### MacOS X
The installation of **EigenPy** on Mac OS X is made via [HomeBrew](https://brew.sh/).
You just need to register the tap of the sofware repository.
If you have taken part to the development of **EigenPy**, feel free to add your name and contribution here.
The matrix abstract layer depends on several packages which
have to be available on your machine.
## Acknowledgments
- Libraries:
- eigen3
- System tools:
- CMake (>=2.6)
- pkg-config
- usual compilation tools (GCC/G++, make, etc.)
- Python 2.7
- Boost python
The development of **EigenPy** is supported by the [Gepetto team](http://projects.laas.fr/gepetto/)[@LAAS-CNRS](http://www.laas.fr) and the [Willow team](https://www.di.ens.fr/willow/)[@INRIA](http://www.inria.fr).