Skip to content

Commit cc475bc

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

1 file changed

Lines changed: 12 additions & 8 deletions

File tree

  • lib/node_modules/@stdlib/ndarray/zeros/docs

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

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -20,21 +20,25 @@
2020
options.mode: string (optional)
2121
Specifies how to handle indices which exceed array dimensions. If equal
2222
to 'throw', an ndarray instance throws an error when an index exceeds
23+
array dimensions. If equal to 'normalize', an ndarray instance
24+
normalizes negative indices and throws an error when an index exceeds
2325
array dimensions. If equal to 'wrap', an ndarray instance wraps around
2426
indices exceeding array dimensions using modulo arithmetic. If equal to
25-
'clamp', an ndarray instance sets an index exceeding array dimensions to
26-
either `0` (minimum index) or the maximum index. Default: 'throw'.
27+
'clamp', an ndarray instance sets an index exceeding array dimensions
28+
to either `0` (minimum index) or the maximum index. Default: 'throw'.
2729

2830
options.submode: Array<string> (optional)
2931
Specifies how to handle subscripts which exceed array dimensions. If a
3032
mode for a corresponding dimension is equal to 'throw', an ndarray
3133
instance throws an error when a subscript exceeds array dimensions. If
32-
equal to 'wrap', an ndarray instance wraps around subscripts exceeding
33-
array dimensions using modulo arithmetic. If equal to 'clamp', an
34-
ndarray instance sets a subscript exceeding array dimensions to either
35-
`0` (minimum index) or the maximum index. If the number of modes is
36-
fewer than the number of dimensions, the function recycles modes using
37-
modulo arithmetic. Default: [ options.mode ].
34+
equal to 'normalize', an ndarray instance normalizes negative
35+
subscripts and throws an error when a subscript exceeds array
36+
dimensions. If equal to 'wrap', an ndarray instance wraps around
37+
subscripts exceeding array dimensions using modulo arithmetic. If equal
38+
to 'clamp', an ndarray instance sets a subscript exceeding array
39+
dimensions to either `0` (minimum index) or the maximum index. If the
40+
number of modes is fewer than the number of dimensions, the function
41+
recycles modes using modulo arithmetic. Default: [ options.mode ].
3842

3943
options.readonly: boolean (optional)
4044
Boolean indicating whether an array should be read-only. Default: false.

0 commit comments

Comments
 (0)