Closed r-barnes closed 3 years ago
Updated to include most of the remaining Graph methods.
I will make a few smaller changes after accepting this one into the master branch.
The excessive Scope::
thing is the only thing that bugs me a tiny bit, readability-wise, but that does not hinder me from really appreciating all your efforts into making this python wrapper.
@franktakes: The argument for enum class is that a standard enum has the same type as an integer, which drops a lot of potential safety.
This PR uses PyBind11 to create libraries that work directly with Python, vastly simplifying the interface.
To simplify compilation of the libraries, I've switched the build system to cmake.
Scope
is also made anenum class
for improved safety.The README file is modified to explain how to perform the build.
The Python bindings themselves live in
python_wrapper.cpp
and should be fairly straight-forward: you just need to list the methods of the class and, optionally, the names of the arguments to each function - everything else is handled automagically.examples/python_example.py
shows how to use the Python library (usebuild/
as the working directory).It's also straight-forward to integrate this with numpy to avoid memory duplication when shuffling data between teexGraph and Python.