Skip to content

henricryden/pybind11_eigen

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

pybind11 with Eigen

Overview

This repository demonstrates how to integrate C++ code with NumPy using pybind11 and Eigen tensors.

The repository has a Dockerfile and uses cmake.

Get started

1. Clone this repository

git clone https://github.com/henricryden/pybind11_eigen.git

2. Build the Docker image

cd pybind11_eigen/docker
docker build . -t pybind11_eigen

3. Start a container

docker run -v <PATH_TO_THIS_REPO>:/code/ --rm -it --hostname pybind11_eigen --workdir /code pybind11_eigen

4. Build the source (terminal should prefix with (pybind-310) root@pybind11_eigen:/code#):

mkdir build
cd build
cmake ../src
make
exit

5. Try the python wrapper

python ./python_project/test_wrapper.py

About

A simple example of using pybind11 with Eigen

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published