|
38 | 38 | options.mode: string (optional) |
39 | 39 | Specifies how to handle indices which exceed array dimensions. If equal |
40 | 40 | to 'throw', an ndarray instance throws an error when an index exceeds |
| 41 | + array dimensions. If equal to 'normalize', an ndarray instance |
| 42 | + normalizes negative indices and throws an error when an index exceeds |
41 | 43 | array dimensions. If equal to 'wrap', an ndarray instance wraps around |
42 | 44 | indices exceeding array dimensions using modulo arithmetic. If equal to |
43 | | - 'clamp', an ndarray instance sets an index exceeding array dimensions to |
44 | | - either `0` (minimum index) or the maximum index. Default: 'throw'. |
| 45 | + 'clamp', an ndarray instance sets an index exceeding array dimensions |
| 46 | + to either `0` (minimum index) or the maximum index. Default: 'throw'. |
45 | 47 |
|
46 | 48 | options.submode: Array<string> (optional) |
47 | 49 | Specifies how to handle subscripts which exceed array dimensions. If a |
48 | 50 | mode for a corresponding dimension is equal to 'throw', an ndarray |
49 | 51 | instance throws an error when a subscript exceeds array dimensions. If |
50 | | - equal to 'wrap', an ndarray instance wraps around subscripts exceeding |
51 | | - array dimensions using modulo arithmetic. If equal to 'clamp', an |
52 | | - ndarray instance sets a subscript exceeding array dimensions to either |
53 | | - `0` (minimum index) or the maximum index. If the number of modes is |
54 | | - fewer than the number of dimensions, the function recycles modes using |
55 | | - modulo arithmetic. Default: [ options.mode ]. |
| 52 | + equal to 'normalize', an ndarray instance normalizes negative |
| 53 | + subscripts and throws an error when a subscript exceeds array |
| 54 | + dimensions. If equal to 'wrap', an ndarray instance wraps around |
| 55 | + subscripts exceeding array dimensions using modulo arithmetic. If equal |
| 56 | + to 'clamp', an ndarray instance sets a subscript exceeding array |
| 57 | + dimensions to either `0` (minimum index) or the maximum index. If the |
| 58 | + number of modes is fewer than the number of dimensions, the function |
| 59 | + recycles modes using modulo arithmetic. Default: [ options.mode ]. |
56 | 60 |
|
57 | 61 | Returns |
58 | 62 | ------- |
|
0 commit comments