You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- 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.
63
63
64
64
:::{tip}
65
-
An object supporting DLPack has `__dlpack__` and `__dlpack_device__` methods.
66
65
An object supporting the buffer protocol can be turned into a memoryview through `memoryview(obj)`.
67
66
:::
68
67
@@ -84,19 +83,18 @@ Convert the input to an array.
84
83
85
84
- **device**: _Optional\[ <device> ]_
86
85
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`.
88
87
89
88
- **copy**: _Optional\[ bool ]_
90
89
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`.
0 commit comments