We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
The buffer protocol offers a lower-level interface to access the contents of a buffer structure like bytearray, array.array and numpy's ndarray.
array.array
ndarray
The C API for this protocol is defined in https://docs.python.org/3/c-api/buffer.html
Typing support came in 3.12 for collections.abc.Buffer but is available in typing_extensions.Buffer. Neither are generic, although numpy has a typing extension, none of those generics are suitable https://numpy.org/devdocs/reference/typing.html#numpy.typing.ArrayLike
collections.abc.Buffer
typing_extensions.Buffer
We need to:
Buffer
PyObject
I think this would provide a faster interface for getting data out of large numpy arrays rather than using .tolist()
.tolist()
The text was updated successfully, but these errors were encountered:
Successfully merging a pull request may close this issue.
The buffer protocol offers a lower-level interface to access the contents of a buffer structure like bytearray,
array.array
and numpy'sndarray
.The C API for this protocol is defined in
https://docs.python.org/3/c-api/buffer.html
Typing support came in 3.12 for
collections.abc.Buffer
but is available intyping_extensions.Buffer
. Neither are generic, although numpy has a typing extension, none of those generics are suitable https://numpy.org/devdocs/reference/typing.html#numpy.typing.ArrayLikeWe need to:
Buffer
' as a result typePyObject
I think this would provide a faster interface for getting data out of large numpy arrays rather than using
.tolist()
The text was updated successfully, but these errors were encountered: