Skip to main content
1 vote
0 answers
51 views

Given classes and their members: struct A { int member; }; struct B { A a; }; I can use nanobind to export member of a as: NB_MODULE(foo, m) { nanobind::class ::_<B>(m, "B&...
Konstante's user avatar
  • 671
0 votes
1 answer
92 views

I'm using ctype to call C code from Python. The C function I need to call takes a char***, and so it's bind as using a ctypes.POINTER(ctypes.POINTER(ctypes.c_char)). I don't understand how I should ...
jpo38's user avatar
  • 21.9k
1 vote
0 answers
276 views

Say I have the following C++ Date class. Using pybind11 I can easily wrap it to be used in Python: /* date.hpp */ class Date { public: int year, month, day; Date(int year, int month, int ...
Phil-ZXX's user avatar
  • 3,601
2 votes
0 answers
561 views

I'm creating a C++ class that handle the values passed by the client in a JSON (converted in a dict with json.loads), I make a Cpp class named Parameter and I need to pass a type to the constructor to ...
Arkhangel's user avatar
2 votes
1 answer
278 views

Nanobind has a function nb::ndarray_check(handle h) which returns true in case h is usable as an ndarray (e.g. if it implements the buffer protocol). How do I actually create an instance of nb::...
captain_error's user avatar
0 votes
0 answers
80 views

How to use functional pointers(C style) with pybind to implement callback functionality.The c++ code has to call the python function . I am encountering errors related to type conversion when trying ...
Ashok's user avatar
  • 11
0 votes
0 answers
114 views

I'm developing for RPi. I'd like to do the majority of my coding on a fast, local machine with a snappy IDE. To do this, I need to be able to pip install the same modules as I have on the RPi. Problem ...
Sam's user avatar
  • 3,495
0 votes
0 answers
99 views

I have this C library that I want to create a Python binding for. I chose CFFI for this task. In this lib of tens of functions, some takes void* as an input. As the lib imply, you can actually pass ...
tfromont's user avatar
1 vote
1 answer
123 views

I am running Python 3.9, 64bit, and have compiled libharu and some extensions into a DLL, including libpng, with VS 2022. The DLL can load into Python after adding minimal code tweaking to find the VS ...
user3425798's user avatar
5 votes
1 answer
814 views

I am building a library (Ubuntu 22) that uses onnxruntime under the hood. In turn, onnxruntime uses CUDA, dynamically loading some dedicated "backend". I build the whole code stack except ...
ajc's user avatar
  • 395
0 votes
1 answer
153 views

I am trying to initialize a map from strings to unique pointers from cppyy. I am able to make a vector of pointers without issue, but I get some complaints from cppyy when I make a map. Here are my ...
shouriha's user avatar
  • 109
3 votes
1 answer
159 views

I would love to love cppyy. However the codebase I am using has heavy use of std.unique_ptr, rvalue pointers, and templates. I am confused about how to translate these into something I can call from ...
shouriha's user avatar
  • 109
0 votes
1 answer
187 views

So , what I want to do is to call this async function in the recursive function in python . But it is not working and I dont have idea why it shouldn't . This is my binding for async function in hpx ...
Shubham kumar's user avatar
1 vote
1 answer
136 views

I am trying to implement a cache for the private variable of any python class. Let's suppose I have this: #[pyclass] struct ClassA { pv: Py<PyAny>, // GIL independent type, storable in ...
Jim's user avatar
  • 841
0 votes
1 answer
789 views

I'm trying to make Python bindings for some C++ code that I created using an existing C++ library. I'm using PyBind11 and CMake to build the bindings and convert them into a shared library (.so) that ...
Yadu Krishnan's user avatar

15 30 50 per page
1
2 3 4 5
7