Skip to content

Commit 8727c76

Browse files
authored
Apply suggestions from code review
1 parent ee79362 commit 8727c76

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/array_api_stubs/_draft/array_object.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -631,7 +631,7 @@ def __getitem__(
631631
an array containing the accessed value(s). The returned array must have the same data type as ``self``.
632632
633633
.. note::
634-
When ``__getitem__`` is defined on an object, Python will automatically define iteration (i.e., the behavior from ``iter(x)``) as ``x[0]``, ``x[1]``, and so forth. This can also be implemented directly by defining ``__iter__``. Therefore, for one-dimensional arrays, iteration should produce a sequence of zero-dimensional arrays ``x[0]``, ``x[1]``, and so forth. Iteration behavior for arrays having more than one dimension is unspecified and thus implementation-defined.
634+
When ``__getitem__`` is defined on an object, Python will automatically define iteration (i.e., the behavior from ``iter(x)``) as ``x[0]``, ``x[1]``, ..., ``x[N-1]``. This can also be implemented directly by defining ``__iter__``. Therefore, for a one-dimensional array ``x``, iteration should produce a sequence of zero-dimensional arrays ``x[0]``, ``x[1]``, ..., ``x[N-1]``, where ``N`` is the number of elements in the array. Iteration behavior for arrays having more than one dimension is unspecified and thus implementation-defined.
635635
636636
"""
637637

0 commit comments

Comments
 (0)