Skip to content

Commit caf1011

Browse files
authored
Use parameter name obj in asarray device doc (#681)
The asarray creation function uses obj instead of x.
1 parent 3854e74 commit caf1011

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

Diff for: src/array_api_stubs/_2021_12/creation_functions.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ def asarray(obj: Union[array, bool, int, float, NestedSequence, SupportsBufferPr
6060
If an input value exceeds the precision of the resolved output array data type, behavior is left unspecified and, thus, implementation-defined.
6161
6262
device: Optional[device]
63-
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``.
63+
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``.
6464
copy: Optional[bool]
6565
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``.
6666

Diff for: src/array_api_stubs/_2022_12/creation_functions.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ def asarray(
8989
If an input value exceeds the precision of the resolved output array data type, behavior is left unspecified and, thus, implementation-defined.
9090
9191
device: Optional[device]
92-
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``.
92+
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``.
9393
copy: Optional[bool]
9494
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``.
9595

Diff for: src/array_api_stubs/_draft/creation_functions.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ def asarray(
8989
If an input value exceeds the precision of the resolved output array data type, behavior is left unspecified and, thus, implementation-defined.
9090
9191
device: Optional[device]
92-
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``.
92+
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``.
9393
copy: Optional[bool]
9494
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``.
9595

0 commit comments

Comments
 (0)