|
14 | 14 | Data source. If provided along with a `buffer` argument, the argument
|
15 | 15 | takes precedence.
|
16 | 16 |
|
17 |
| - options.dtype: string (optional) |
| 17 | + options.dtype: string|DataType (optional) |
18 | 18 | Underlying storage data type. If not specified and a data source is
|
19 | 19 | provided, the data type is inferred from the provided data source. If an
|
20 | 20 | input data source is not of the same type, this option specifies the
|
|
33 | 33 | - 'row-major': the order of the returned array is row-major.
|
34 | 34 | - 'column-major': the order of the returned array is column-major.
|
35 | 35 | - 'any': if a data source is column-major and not row-major, the order
|
36 |
| - of the returned array is column-major; otherwise, the order of the |
37 |
| - returned array is row-major. |
| 36 | + of the returned array is column-major; otherwise, the order of the |
| 37 | + returned array is row-major. |
38 | 38 | - 'same': the order of the returned array matches the order of an input
|
39 |
| - data source. |
| 39 | + data source. |
40 | 40 |
|
41 | 41 | Note that specifying an order which differs from the order of a
|
42 | 42 | provided data source does *not* entail a conversion from one memory
|
|
82 | 82 | - 'equiv': allow casting between identical and byte swapped types.
|
83 | 83 | - 'safe': only allow "safe" casts.
|
84 | 84 | - 'mostly-safe': allow "safe casts" and, for floating-point data types,
|
85 |
| - downcasts. |
| 85 | + downcasts. |
86 | 86 | - 'same-kind': allow "safe" casts and casts within the same kind (e.g.,
|
87 |
| - between signed integers or between floats). |
| 87 | + between signed integers or between floats). |
88 | 88 | - 'unsafe': allow casting between all types (including between integers
|
89 |
| - and floats). |
| 89 | + and floats). |
90 | 90 |
|
91 | 91 | Default: 'safe'.
|
92 | 92 |
|
|
100 | 100 | option may be one of the following values:
|
101 | 101 |
|
102 | 102 | - 'throw': an ndarray instance throws an error when an index exceeds
|
103 |
| - array dimensions. |
| 103 | + array dimensions. |
104 | 104 | - 'normalize': an ndarray instance normalizes negative indices and
|
105 |
| - throws an error when an index exceeds array dimensions. |
| 105 | + throws an error when an index exceeds array dimensions. |
106 | 106 | - 'wrap': an ndarray instance wraps around indices exceeding array
|
107 |
| - dimensions using modulo arithmetic. |
| 107 | + dimensions using modulo arithmetic. |
108 | 108 | - 'clamp', an ndarray instance sets an index exceeding array dimensions
|
109 |
| - to either `0` (minimum index) or the maximum index. |
| 109 | + to either `0` (minimum index) or the maximum index. |
110 | 110 |
|
111 | 111 | Default: 'throw'.
|
112 | 112 |
|
|
115 | 115 | mode for a corresponding dimension is equal to
|
116 | 116 |
|
117 | 117 | - 'throw': an ndarray instance throws an error when a subscript exceeds
|
118 |
| - array dimensions. |
| 118 | + array dimensions. |
119 | 119 | - 'normalize': an ndarray instance normalizes negative subscripts and
|
120 |
| - throws an error when a subscript exceeds array dimensions. |
| 120 | + throws an error when a subscript exceeds array dimensions. |
121 | 121 | - 'wrap': an ndarray instance wraps around subscripts exceeding array
|
122 |
| - dimensions using modulo arithmetic. |
| 122 | + dimensions using modulo arithmetic. |
123 | 123 | - 'clamp': an ndarray instance sets a subscript exceeding array
|
124 |
| - dimensions to either `0` (minimum index) or the maximum index. |
| 124 | + dimensions to either `0` (minimum index) or the maximum index. |
125 | 125 |
|
126 | 126 | If the number of modes is fewer than the number of dimensions, the
|
127 | 127 | function recycles modes using modulo arithmetic.
|
|
0 commit comments