Skip to content

Commit 55928ab

Browse files
committed
feat: document support for normalize index mode
1 parent 9ed4346 commit 55928ab

1 file changed

Lines changed: 12 additions & 8 deletions

File tree

  • lib/node_modules/@stdlib/ndarray/empty-like/docs

lib/node_modules/@stdlib/ndarray/empty-like/docs/repl.txt

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -38,21 +38,25 @@
3838
options.mode: string (optional)
3939
Specifies how to handle indices which exceed array dimensions. If equal
4040
to 'throw', an ndarray instance throws an error when an index exceeds
41+
array dimensions. If equal to 'normalize', an ndarray instance
42+
normalizes negative indices and throws an error when an index exceeds
4143
array dimensions. If equal to 'wrap', an ndarray instance wraps around
4244
indices exceeding array dimensions using modulo arithmetic. If equal to
43-
'clamp', an ndarray instance sets an index exceeding array dimensions to
44-
either `0` (minimum index) or the maximum index. Default: 'throw'.
45+
'clamp', an ndarray instance sets an index exceeding array dimensions
46+
to either `0` (minimum index) or the maximum index. Default: 'throw'.
4547

4648
options.submode: Array<string> (optional)
4749
Specifies how to handle subscripts which exceed array dimensions. If a
4850
mode for a corresponding dimension is equal to 'throw', an ndarray
4951
instance throws an error when a subscript exceeds array dimensions. If
50-
equal to 'wrap', an ndarray instance wraps around subscripts exceeding
51-
array dimensions using modulo arithmetic. If equal to 'clamp', an
52-
ndarray instance sets a subscript exceeding array dimensions to either
53-
`0` (minimum index) or the maximum index. If the number of modes is
54-
fewer than the number of dimensions, the function recycles modes using
55-
modulo arithmetic. Default: [ options.mode ].
52+
equal to 'normalize', an ndarray instance normalizes negative
53+
subscripts and throws an error when a subscript exceeds array
54+
dimensions. If equal to 'wrap', an ndarray instance wraps around
55+
subscripts exceeding array dimensions using modulo arithmetic. If equal
56+
to 'clamp', an ndarray instance sets a subscript exceeding array
57+
dimensions to either `0` (minimum index) or the maximum index. If the
58+
number of modes is fewer than the number of dimensions, the function
59+
recycles modes using modulo arithmetic. Default: [ options.mode ].
5660

5761
Returns
5862
-------

0 commit comments

Comments
 (0)