Skip to content

Commit b0aacd9

Browse files
authored
fix: resolve conflicting exception guidance in __dlpack__
PR-URL: #887 Closes: #831
1 parent 73e7228 commit b0aacd9

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/array_api_stubs/_2023_12/array_object.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -364,7 +364,7 @@ def __dlpack__(
364364
``__dlpack__`` to return a capsule referencing an array whose underlying memory is
365365
accessible to the Python interpreter (represented by the ``kDLCPU`` enumerator in DLPack).
366366
If a copy must be made to enable this support but ``copy`` is set to ``False``, the
367-
function must raise ``ValueError``.
367+
function must raise ``BufferError``.
368368
369369
Other device kinds will be considered for standardization in a future version of this
370370
API standard.

src/array_api_stubs/_draft/array_object.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -364,7 +364,7 @@ def __dlpack__(
364364
``__dlpack__`` to return a capsule referencing an array whose underlying memory is
365365
accessible to the Python interpreter (represented by the ``kDLCPU`` enumerator in DLPack).
366366
If a copy must be made to enable this support but ``copy`` is set to ``False``, the
367-
function must raise ``ValueError``.
367+
function must raise ``BufferError``.
368368
369369
Other device kinds will be considered for standardization in a future version of this
370370
API standard.

0 commit comments

Comments
 (0)