Skip to content

Commit 7d3d8fe

Browse files
authored
Remove DLPack support from asarray (#301)
1 parent 996111c commit 7d3d8fe

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

spec/API_specification/creation_functions.md

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -57,12 +57,11 @@ Convert the input to an array.
5757

5858
#### Parameters
5959

60-
- **obj**: _Union\[ <array>, bool, int, float, NestedSequence\[ bool | int | float ], SupportsDLPack, SupportsBufferProtocol ]_
60+
- **obj**: _Union\[ <array>, bool, int, float, NestedSequence\[ bool | int | float ], SupportsBufferProtocol ]_
6161

62-
- object to be converted to an array. May be a Python scalar, a (possibly nested) sequence of Python scalars, or an object supporting DLPack or the Python buffer protocol.
62+
- object to be converted to an array. May be a Python scalar, a (possibly nested) sequence of Python scalars, or an object supporting the Python buffer protocol.
6363

6464
:::{tip}
65-
An object supporting DLPack has `__dlpack__` and `__dlpack_device__` methods.
6665
An object supporting the buffer protocol can be turned into a memoryview through `memoryview(obj)`.
6766
:::
6867

@@ -84,19 +83,18 @@ Convert the input to an array.
8483
8584
- **device**: _Optional\[ <device> ]_
8685
87-
- device on which to place the created array. If `device` is `None` and `x` is either an array or an object supporting DLPack, the output array device must be inferred from `x`. Default: `None`.
86+
- device on which to place the created array. If `device` is `None` and `x` is an array, the output array device must be inferred from `x`. Default: `None`.
8887
8988
- **copy**: _Optional\[ bool ]_
9089
91-
- boolean indicating whether or not to copy the input. If `True`, the function must always copy. If `False`, the function must never copy for input which supports DLPack or the buffer protocol and must raise a `ValueError` in case a copy would be necessary. If `None`, the function must reuse existing memory buffer if possible and copy otherwise. Default: `None`.
90+
- boolean indicating whether or not to copy the input. If `True`, the function must always copy. If `False`, the function must never copy for input which supports the buffer protocol and must raise a `ValueError` in case a copy would be necessary. If `None`, the function must reuse existing memory buffer if possible and copy otherwise. Default: `None`.
9291
9392
#### Returns
9493
9594
- **out**: _<array>_
9695
9796
- an array containing the data from `obj`.
9897
99-
10098
(function-empty)=
10199
### empty(shape, *, dtype=None, device=None)
102100

0 commit comments

Comments
 (0)