Skip to content

Commit 2d7299c

Browse files
committed
docs: document support for normalize index mode
1 parent 8a27986 commit 2d7299c

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

Diff for: lib/node_modules/@stdlib/ndarray/array/README.md

+1
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,7 @@ The function accepts the following `options`:
114114
- **mode**: specifies how to handle indices which exceed array dimensions.
115115

116116
- `throw`: specifies that an [`ndarray`][@stdlib/ndarray/ctor] instance should throw an error when an index exceeds array dimensions.
117+
- `normalize`: specifies that an [`ndarray`][@stdlib/ndarray/ctor] instance should normalize negative indices and throw an error when an index exceeds array dimensions.
117118
- `wrap`: specifies that an [`ndarray`][@stdlib/ndarray/ctor] instance should wrap around an index exceeding array dimensions using modulo arithmetic.
118119
- `clamp`: specifies that an [`ndarray`][@stdlib/ndarray/ctor] instance should set an index exceeding array dimensions to either `0` (minimum index) or the maximum index.
119120

Diff for: lib/node_modules/@stdlib/ndarray/array/docs/repl.txt

+4
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,8 @@
101101

102102
- 'throw': an ndarray instance throws an error when an index exceeds
103103
array dimensions.
104+
- 'normalize': an ndarray instance normalizes negative indices and
105+
throws an error when an index exceeds array dimensions.
104106
- 'wrap': an ndarray instance wraps around indices exceeding array
105107
dimensions using modulo arithmetic.
106108
- 'clamp', an ndarray instance sets an index exceeding array dimensions
@@ -114,6 +116,8 @@
114116

115117
- 'throw': an ndarray instance throws an error when a subscript exceeds
116118
array dimensions.
119+
- 'normalize': an ndarray instance normalizes negative subscripts and
120+
throws an error when a subscript exceeds array dimensions.
117121
- 'wrap': an ndarray instance wraps around subscripts exceeding array
118122
dimensions using modulo arithmetic.
119123
- 'clamp': an ndarray instance sets a subscript exceeding array

0 commit comments

Comments
 (0)