You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I tried to bind a fixed-size C-array by array_t. I tried to bind the vector by the bind_vector. Both worked. Following the same logic, I tried to bind it as a 2D vector but it seems not to work. I tried to use a combination of array_t and bind_vector and it still reports me error. I found it works if I include get and set functions within the structure like the following
Since the model has a large amount of data and can be edited quite often so we would like to avoid copying the data as what we have now in this process. We also want to fix one of the dimensions to reduce workload. I have been stuck on this problem for a few days since I figured out how to bind all out types we need. I appreciate it if you could me some insights or suggestions!
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
Hi there! I am trying to write some test codes to see if pybind11 can fulfill all our needs to bind our C++ program.
The goal is to bind a struct to include the following data:
I tried to bind a fixed-size C-array by
array_t
. I tried to bind the vector by thebind_vector
. Both worked. Following the same logic, I tried to bind it as a 2D vector but it seems not to work. I tried to use a combination ofarray_t
andbind_vector
and it still reports me error. I found it works if I include get and set functions within the structure like the followingSince the model has a large amount of data and can be edited quite often so we would like to avoid copying the data as what we have now in this process. We also want to fix one of the dimensions to reduce workload. I have been stuck on this problem for a few days since I figured out how to bind all out types we need. I appreciate it if you could me some insights or suggestions!
Beta Was this translation helpful? Give feedback.
All reactions