Image.cast#
- Image.cast(value: int | float | ndarray) Any[source][source]#
Cast value to same type as image
- Parameters:
value (scalar, ndarray) – value to cast
- Returns:
value cast to same type as image
- Return type:
numpy type, ndarray
The value, scalar or integer, is cast to the same type as the image. The result has the same numeric value, but the type is changed.
Examples
Note
Scalars are cast to NumPy types not native Python types.
See also