jacobian

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | README

commit 56b34e303e5b69ac1201a501d54e91df3dda769a
parent 25974fc4deb83e9655485d8a727d719f54759fab
Author: David Freifeld <freifeld.david@gmail.com>
Date:   Mon, 22 Jun 2020 16:24:14 -0700

First successful test of python bindings.

Diffstat:
Mmr_bpnn_2.cpp | 4++--
Areadme.md | 11+++++++++++
2 files changed, 13 insertions(+), 2 deletions(-)

diff --git a/mr_bpnn_2.cpp b/mr_bpnn_2.cpp @@ -125,6 +125,6 @@ int main(int argc, char** argv) PYBIND11_MODULE(mrbpnn, m) { m.doc() = "pybind11 example plugin"; // optional module docstring - - m.def("add", &benchmark, "A function which times the BPNN", py::arg("epochs")); + + m.def("benchmark", &benchmark, "A function which times the BPNN", py::arg("epochs")); } diff --git a/readme.md b/readme.md @@ -0,0 +1,11 @@ +# Python Bindings +Experimental code is experimental. + +Install both the C++ end of pybind11 and the python end. + +Build with +``` +c++ -O2 -Wall -shared -std=c++11 -undefined dynamic_lookup `python3 -m pybind11 --includes` mr_bpnn_2.cpp bpnn.cpp mapreduce.a -o mrbpnn`python3-config --extension-suffix` +``` + +And import `mrbpnn` from your Python code.