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
Copy file name to clipboardExpand all lines: src/array_api_stubs/_draft/creation_functions.py
+4-14Lines changed: 4 additions & 14 deletions
Original file line number
Diff line number
Diff line change
@@ -90,12 +90,6 @@ def asarray(
90
90
91
91
An object supporting the buffer protocol can be turned into a memoryview through ``memoryview(obj)``.
92
92
93
-
.. note::
94
-
If ``obj`` is a sequence with some elements being arrays, the behavior is unspecified and thus implementation-defined. Conforming
95
-
implentations may perform the conversion or raise an error.
96
-
97
-
To join a sequence of arrays along a new axis, see :func:`~array_api.stack`.
98
-
99
93
dtype: Optional[dtype]
100
94
output array data type. If ``dtype`` is ``None``, the output array data type must be inferred from the data type(s) in ``obj``. If all input values are Python scalars, then, in order of precedence,
101
95
@@ -106,14 +100,6 @@ def asarray(
106
100
107
101
Default: ``None``.
108
102
109
-
.. admonition:: Note
110
-
:class: note
111
-
112
-
If ``dtype`` is not ``None``, then array conversions should obey :ref:`type-promotion` rules. Conversions not specified according to :ref:`type-promotion` rules may or may not be permitted by a conforming array library. To perform an explicit cast, use :func:`array_api.astype`.
113
-
114
-
.. note::
115
-
If an input value exceeds the precision of the resolved output array data type, behavior is left unspecified and, thus, implementation-defined.
116
-
117
103
device: Optional[device]
118
104
device on which to place the created array. If ``device`` is ``None`` and ``obj`` is an array, the output array device must be inferred from ``obj``. Default: ``None``.
119
105
copy: Optional[bool]
@@ -127,6 +113,10 @@ def asarray(
127
113
Notes
128
114
-----
129
115
116
+
- If ``obj`` is a sequence with some elements being arrays, behavior is unspecified and thus implementation-defined. Conforming implementations may perform a conversion or raise an exception. To join a sequence of arrays along a new axis, see :func:`~array_api.stack`.
117
+
- If ``dtype`` is not ``None``, then array conversions should obey :ref:`type-promotion` rules. Conversions not specified according to :ref:`type-promotion` rules may or may not be permitted by a conforming array library. To perform an explicit cast, use :func:`array_api.astype`.
118
+
- If an input value exceeds the precision of the resolved output array data type, behavior is left unspecified and, thus, implementation-defined.
0 commit comments