|
27 | 27 | options.mode: string (optional)
|
28 | 28 | Specifies how to handle indices which exceed array dimensions. If equal
|
29 | 29 | 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 |
30 | 32 | array dimensions. If equal to 'wrap', an ndarray instance wraps around
|
31 | 33 | 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'. |
34 | 36 |
|
35 | 37 | options.submode: Array<string> (optional)
|
36 | 38 | Specifies how to handle subscripts which exceed array dimensions. If a
|
37 | 39 | mode for a corresponding dimension is equal to 'throw', an ndarray
|
38 | 40 | 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 |
<
50C9
/code> | 47 | + number of modes is fewer than the number of dimensions, the function |
| 48 | + recycles modes using modulo arithmetic. Default: [ options.mode ]. |
45 | 49 |
|
46 | 50 | Returns
|
47 | 51 | -------
|
|
0 commit comments