Interoperability with NumPy — NumPy v2.6.dev0 Manual

numpy.org

Tin mới

NEP 18 — A dispatch mechanism for NumPy’s high level array functions

in the Python C-API documentation

The buffer protocol, described in the Python C-API documentation.

The array interface protocol

Writing custom array containers

Special attributes and methods

Special attributes and methods (details on the __array_ufunc__ and __array_function__ protocols)

Subclassing ndarray

Subclassing ndarray (details on the __array_wrap__ and __array_finalize__ methods)

Specific features of ndarray sub-typing

Specific features of ndarray sub-typing (more details on the implementation of __array_finalize__, __array_wrap__ and __array_priority__)

NumPy roadmap: interoperability

PyTorch documentation on the Bridge with NumPy