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 have two questions. Say I create a py::array_t via an embedded Python interpreter action, like py::array_t<float> rdata = rdict.attr("get")("input_features");. Then:
Is the underlying data in an array_t stored on the stack or heap?
If it is on the heap, then I have data that is stored in an array_t that I would like to transfer the ownership of, in order to use in other places. I assume that once the actual array_t goes out of scope, it calls the destructor of this data, but I would like to preserve it out of scope. Is this possible?
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
-
I have two questions. Say I create a py::array_t via an embedded Python interpreter action, like
py::array_t<float> rdata = rdict.attr("get")("input_features");
. Then:array_t
stored on the stack or heap?array_t
that I would like to transfer the ownership of, in order to use in other places. I assume that once the actualarray_t
goes out of scope, it calls the destructor of this data, but I would like to preserve it out of scope. Is this possible?Beta Was this translation helpful? Give feedback.
All reactions