Skip to content

Instantly share code, notes, and snippets.

@ihnorton
Last active May 8, 2020 15:46
Show Gist options
  • Save ihnorton/a39fe7c9ae0030dd493ab52a56edc43f to your computer and use it in GitHub Desktop.
Save ihnorton/a39fe7c9ae0030dd493ab52a56edc43f to your computer and use it in GitHub Desktop.
how to get data pointer from pybind11::array_t
# 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