Get a version of the given `array` in the internal flavor. The input `array` must be of the given `src_flavor`, and the returned array will be of the internal flavor. If the conversion is not supported, a ``FlavorError`` is raised.
(
array: npt.ArrayLike, src_flavor: FlavorType
)
| 172 | |
| 173 | |
| 174 | def array_as_internal( |
| 175 | array: npt.ArrayLike, src_flavor: FlavorType |
| 176 | ) -> np.ndarray: |
| 177 | """Get a version of the given `array` in the internal flavor. |
| 178 | |
| 179 | The input `array` must be of the given `src_flavor`, and the |
| 180 | returned array will be of the internal flavor. |
| 181 | |
| 182 | If the conversion is not supported, a ``FlavorError`` is raised. |
| 183 | |
| 184 | """ |
| 185 | return array_of_flavor2(array, src_flavor, internal_flavor) |
| 186 | |
| 187 | |
| 188 | def flavor_of(array: npt.ArrayLike) -> FlavorType: |
no test coverage detected