diff --git a/spec/API_specification/array_api/array_object.py b/spec/API_specification/array_api/array_object.py index 94dac2d1d..cc24a3bbe 100644 --- a/spec/API_specification/array_api/array_object.py +++ b/spec/API_specification/array_api/array_object.py @@ -290,6 +290,15 @@ def __dlpack__(self: array, /, *, stream: Optional[Union[int, Any]] = None) -> P ------- capsule: PyCapsule a DLPack capsule for the array. See :ref:`data-interchange` for details. + + Raises + ------ + BufferError + Implementations should raise ``BufferError`` when the data cannot + be exported as DLPack (e.g., incompatible dtype or strides). Other + errors are raised when export fails for other reasons (e.g., incorrect + arguments passed or out of memory). + """ def __dlpack_device__(self: array, /) -> Tuple[Enum, int]: