You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: lib/node_modules/@stdlib/ndarray/ind2sub/README.md
+3-2Lines changed: 3 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -53,13 +53,14 @@ var s = ind2sub( shape, 2 );
53
53
54
54
The function supports the following `options`:
55
55
56
-
-`mode`: specifies how to handle a linear index which exceeds array dimensions. The following modes are supported:
56
+
-**mode**: specifies how to handle a linear index which exceeds array dimensions. The following modes are supported:
57
57
58
58
-`throw`: specifies that the function should throw an error when a linear index exceeds array dimensions.
59
+
-`normalize`: specifies that the function should normalize negative linear indices and throw an error when a linear index exceeds array dimensions.
59
60
-`wrap`: specifies that the function should wrap around a linear index exceeding array dimensions using modulo arithmetic.
60
61
-`clamp`: specifies that the function should set a linear index exceeding array dimensions to either `0` (minimum linear index) or the maximum linear index.
61
62
62
-
-`order`: specifies whether an array is `row-major` (C-style) or `column-major` (Fortran-style). Default: `'row-major'`.
63
+
-**order**: specifies whether an array is `row-major` (C-style) or `column-major` (Fortran-style). Default: `'row-major'`.
63
64
64
65
By default, the function assumes a row-major array. To return subscripts for a column-major array, set the `order` option.
0 commit comments