Last active
May 8, 2020 15:46
-
-
Save ihnorton/a39fe7c9ae0030dd493ab52a56edc43f to your computer and use it in GitHub Desktop.
how to get data pointer from pybind11::array_t
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# for example, in debugger | |
# given `o` that we know is a `pybind11::array_t` of some specialization: | |
((uint64_t*)pybind11::detail::array_proxy(o.m_ptr)->data)[idx] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment