IMPORTANT: To view this page as Markdown, append `.md` to the URL (e.g. /get-started.md). For the complete documentation index, see llms.txt.
Skip to main content
For the complete documentation index, see llms.txt. Markdown versions of all pages are available by appending .md to any URL (e.g. /get-started.md).

Python class

DLPackArray

DLPackArray​

class max.driver.DLPackArray(*args, **kwargs)

source

Bases: Protocol

Protocol for objects that exchange data through the DLPack interface.

Any array-like object implementing __dlpack__ and __dlpack_device__ satisfies this protocol, including NumPy arrays and PyTorch tensors. MAX APIs that consume external array data accept values matching this protocol.