Simple sample project for pybind11
This post describes this repository in Japanese: https://inarizuuuushi.hatenablog.com/entry/2022/10/24/090000
git clone https://github.com/nariaki3551/pybind11-sample.git
cd pybind11-sample
git submodule update --init --recursive
python -m pip install .
- Call a function implemented in C++.
import sequence.sequence_cpp
sequence.sequence_cpp.fibonacci(10)
>>> 55
- Call the function which wraps the above function in Python.
import sequence
sequence.fibonacci(10)
>>> python::55