Skip to content

Commit d23ec22

Browse files
authored
docs: move notes to notes section
1 parent b11fd84 commit d23ec22

File tree

1 file changed

+4
-14
lines changed

1 file changed

+4
-14
lines changed

src/array_api_stubs/_draft/creation_functions.py

Lines changed: 4 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -90,12 +90,6 @@ def asarray(
9090
9191
An object supporting the buffer protocol can be turned into a memoryview through ``memoryview(obj)``.
9292
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-
9993
dtype: Optional[dtype]
10094
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,
10195
@@ -106,14 +100,6 @@ def asarray(
106100
107101
Default: ``None``.
108102
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-
117103
device: Optional[device]
118104
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``.
119105
copy: Optional[bool]
@@ -127,6 +113,10 @@ def asarray(
127113
Notes
128114
-----
129115
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.
119+
130120
.. versionchanged:: 2022.12
131121
Added complex data type support.
132122
"""

0 commit comments

Comments
 (0)