Skip to content

phetdam/npyglue

Repository files navigation

npyglue

A header-only C++ library simplifying Python/C++ interop.

TBD. Requires C++17, has extra features with C++20, and simplifies manual or SWIG-based wrapping of C++ functions in CPython extension modules that operate on NumPy arrays. Additional C++ helpers are provided to simplify use of the Python C API and the NumPy Array C API from C++ when embedding the Python interpreter.

Also provides a facility enabling ownership of arbitrary C++ objects with Python capsules by move construction via placement new. Object type can be queried dynamically at runtime (which requires compilation with RTTI) so the stored void* can be cast and dereferenced safely inside functions for usage in C++ layer.

About

C++ helpers for simplifying Python/C++ NumPy interop.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors