|
51 | 51 | options.mode: string (optional) |
52 | 52 | Specifies how to handle indices which exceed array dimensions. If equal |
53 | 53 | to 'throw', an ndarray instance throws an error when an index exceeds |
| 54 | + array dimensions. If equal to 'normalize', an ndarray instance |
| 55 | + normalizes negative indices and throws an error when an index exceeds |
54 | 56 | array dimensions. If equal to 'wrap', an ndarray instance wraps around |
55 | 57 | indices exceeding array dimensions using modulo arithmetic. If equal to |
56 | | - 'clamp', an ndarray instance sets an index exceeding array dimensions to |
57 | | - either `0` (minimum index) or the maximum index. Default: 'throw'. |
| 58 | + 'clamp', an ndarray instance sets an index exceeding array dimensions |
| 59 | + to either `0` (minimum index) or the maximum index. Default: 'throw'. |
58 | 60 |
|
59 | 61 | options.submode: Array<string> (optional) |
60 | 62 | Specifies how to handle subscripts which exceed array dimensions. If a |
61 | 63 | mode for a corresponding dimension is equal to 'throw', an ndarray |
62 | 64 | instance throws an error when a subscript exceeds array dimensions. If |
63 | | - equal to 'wrap', an ndarray instance wraps around subscripts exceeding |
64 | | - array dimensions using modulo arithmetic. If equal to 'clamp', an |
65 | | - ndarray instance sets a subscript exceeding array dimensions to either |
66 | | - `0` (minimum index) or the maximum index. If the number of modes is |
67 | | - fewer than the number of dimensions, the function recycles modes using |
68 | | - modulo arithmetic. Default: [ options.mode ]. |
| 65 | + equal to 'normalize', an ndarray instance normalizes negative |
| 66 | + subscripts and throws an error when a subscript exceeds array |
| 67 | + dimensions. If equal to 'wrap', an ndarray instance wraps around |
| 68 | + subscripts exceeding array dimensions using modulo arithmetic. If equal |
| 69 | + to 'clamp', an ndarray instance sets a subscript exceeding array |
| 70 | + dimensions to either `0` (minimum index) or the maximum index. If the |
| 71 | + number of modes is fewer than the number of dimensions, the function |
| 72 | + recycles modes using modulo arithmetic. Default: [ options.mode ]. |
69 | 73 |
|
70 | 74 | options.readonly: boolean (optional) |
71 | 75 | Boolean indicating whether an array should be read-only. Default: false. |
|
0 commit comments