Install Eigen on your computer, on Mint/Ubuntu the easiest way for me was to install libeigen3-dev
sudo apt-get install libeigen3-dev
My build and installation instructions use hatch
. But this would also work with pipx
hatch shell
hatch run install
hatch run test
hatch run install_and_test
This uses scikit-build-core to build an example using pybind11 with Eigen.
With hatch
hatch run install
with pipx
pipx run build
You can run the tests with
hatch run install_and_test
or, if you haven't modified the C++
hatch run test
import example
import numpy as np
example.add(1, 2)
a = np.array([[1., 2., 3.],
[4., 5., 6.]],
order = 'F')
b = np.array([[9., 8., 7.],
[6., 5., 4.]],
order = 'F')
example.add_tensor(a, b)
scikit-demo
is distributed under the terms of the MIT license.