Skip to content

Commit aa0b8a1

Browse files
committed
docs: rephrase copy
1 parent dceea5e commit aa0b8a1

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

src/array_api_stubs/_draft/manipulation_functions.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -91,9 +91,7 @@ def expand_dims(x: array, /, axis: Union[int, Tuple[int, ...]]) -> array:
9191
axis position(s) (zero-based). If ``axis`` is an integer,
9292
9393
- a valid axis position **must** reside on the closed-interval ``[-N-1, N]``, where ``N`` is the number of dimensions in ``x``.
94-
- if an axis position is specified as a negative integer, the axis position at which to insert a singleton dimension **must** be computed as ``N + axis + 1``.
95-
- if provided ``-1``, the resolved axis position **must** be ``N`` (i.e., a singleton dimension **must** be appended to the input array ``x``).
96-
- if provided ``-N-1``, the resolved axis position **must** be ``0`` (i.e., a singleton dimension **must** be prepended to the input array ``x``).
94+
- if an axis position is specified as a negative integer, the axis position at which to insert a singleton dimension **must** be computed as ``N + axis + 1``. For example, if provided ``-1``, the resolved axis position **must** be ``N`` (i.e., a singleton dimension **must** be appended to the input array ``x``). Similarly, if provided ``-N-1``, the resolved axis position **must** be ``0`` (i.e., a singleton dimension **must** be prepended to the input array ``x``).
9795
- if provided an invalid axis position, the function **must** raise an exception.
9896
9997
If ``axis`` is a tuple,

0 commit comments

Comments
 (0)