Skip to content

Commit 9ed4346

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

File tree

1 file changed

+12
-8
lines changed
  • lib/node_modules/@stdlib/ndarray/empty/docs

1 file changed

+12
-8
lines changed

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

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -27,21 +27,25 @@
2727
options.mode: string (optional)
2828
Specifies how to handle indices which exceed array dimensions. If equal
2929
to 'throw', an ndarray instance throws an error when an index exceeds
30+
array dimensions. If equal to 'normalize', an ndarray instance
31+
normalizes negative indices and throws an error when an index exceeds
3032
array dimensions. If equal to 'wrap', an ndarray instance wraps around
3133
indices exceeding array dimensions using modulo arithmetic. If equal to
32-
'clamp', an ndarray instance sets an index exceeding array dimensions to
33-
either `0` (minimum index) or the maximum index. Default: 'throw'.
34+
'clamp', an ndarray instance sets an index exceeding array dimensions
35+
to either `0` (minimum index) or the maximum index. Default: 'throw'.
3436

3537
options.submode: Array<string> (optional)
3638
Specifies how to handle subscripts which exceed array dimensions. If a
3739
mode for a corresponding dimension is equal to 'throw', an ndarray
3840
instance throws an error when a subscript exceeds array dimensions. If
39-
equal to 'wrap', an ndarray instance wraps around subscripts exceeding
40-
array dimensions using modulo arithmetic. If equal to 'clamp', an
41-
ndarray instance sets a subscript exceeding array dimensions to either
42-
`0` (minimum index) or the maximum index. If the number of modes is
43-
fewer than the number of dimensions, the function recycles modes using
44-
modulo arithmetic. Default: [ options.mode ].
41+
equal to 'normalize', an ndarray instance normalizes negative
42+
subscripts and throws an error when a subscript exceeds array
43+
dimensions. If equal to 'wrap', an ndarray instance wraps around
44+
subscripts exceeding array dimensions using modulo arithmetic. If equal
45+
to 'clamp', an ndarray instance sets a subscript exceeding array
46+
dimensions to either `0` (minimum index) or the maximum index. If the
47+
number of modes is fewer than the number of dimensions, the function
48+
recycles modes using modulo arithmetic. Default: [ options.mode ].
4549

4650
Returns
4751
-------

0 commit comments

Comments
 (0)