Is it possible to move py::array into std::vector #5278
Unanswered
SergeyStrGroup
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hi. Im trying to fill c++ allocated vector in python code (using python defined functions)
I found disscussion about moving
std::vector
intopy::array
with help of capsule.Is there a better way to do so with py::cast?
py::array arr = py::array(py::cast(std::move(vec)))
is copy, so visa versa do.Is it possible to move
py::array
intostd::vector
? (i mean move vector into python and back)Thanks for any advise!
Beta Was this translation helpful? Give feedback.
All reactions