|
20 | 20 | options.mode: string (optional) |
21 | 21 | Specifies how to handle indices which exceed array dimensions. If equal |
22 | 22 | 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 |
23 | 25 | array dimensions. If equal to 'wrap', an ndarray instance wraps around |
24 | 26 | 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'. |
27 | 29 |
|
28 | 30 | options.submode: Array<string> (optional) |
29 | 31 | Specifies how to handle subscripts which exceed array dimensions. If a |
30 | 32 | mode for a corresponding dimension is equal to 'throw', an ndarray |
31 | 33 | 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 ]. |
38 | 42 |
|
39 | 43 | options.readonly: boolean (optional) |
40 | 44 | Boolean indicating whether an array should be read-only. Default: false. |
|
0 commit comments