Skip to content

A sandbox for me to practice passing NumPy arrays back and forth to C++ with pybind11.

License

Notifications You must be signed in to change notification settings

jamesETsmith/pybind11_numpy

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Overview

Build Codacy Badge

This a set of simple examples for using pybind11 with NumPy arrays focusing specifically on passing arrays from Python to C++, modifying them, and then using them some more in Python.

Software Prerequisites

  • CMake >= 3.19
  • C++ compiler (-std=c++11 or later)
  • Python 3.X
    • pytest
    • pybind11 (included in this package)

Install and Test

git clone --recursive https://github.com/jamesETsmith/pybind11_numpy.git
cd pybind11_numpy
CXX=YOUR_C++_COMPILER cmake -B build
cmake --build build
PYTHONPATH=build/:$PYTHONPATH pytest -v test

About

A sandbox for me to practice passing NumPy arrays back and forth to C++ with pybind11.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published