python (12.9k questions)
javascript (9.2k questions)
reactjs (4.7k questions)
java (4.2k questions)
java (4.2k questions)
c# (3.5k questions)
c# (3.5k questions)
html (3.3k questions)
How to bind a C++ object to an existing python object in Pybind11?
I have made a module that uses the SDL2 library on the C++ side, and I chose to use PySDL2 to provide some existing bindings on the Python side (as manually writing all of them was out of the scope of...

pvallet
Votes: 0
Answers: 0
Conversion - pyBind11 - Passing a torch.Tensor() in Python into a C++ method expecting a std::vector
For a project I am working on, I require passing a PyTorch tensor (with dtype torch.int16) to a C++ method which expects an std::vector (basically, a list of integers).
I have the binding figured out,...
Osama Yousuf
Votes: 0
Answers: 0
Create std::vector<py::handle> in C++ with pybind11
I'm trying to create a std::vector<py::handle> in C++ to unittest a C++ function that receives such a vector. I need to create a vector of integers (py::int_), floats (py::float_) and strings (p...

Daniel Munoz
Votes: 0
Answers: 1
How to bind a method that returns std::shared_ptr< uint8_t > with pybind11
From C++ via pybind11 to Python project I've met with an issue and I don't know how to proceed.
Intro, "Holder classes are only supported for custom types"
There is an abstract C++ class Pag...

Naum
Votes: 0
Answers: 0