colour.utilities.as_float_array#

colour.utilities.as_float_array(a: ArrayLike, dtype: Type[DTypeFloat] | None = None) NDArrayFloat[source]#

Convert the specified variable \(a\) to numpy.ndarray using the specified floating-point numpy.dtype.

Parameters:
Returns:

Variable \(a\) converted to floating-point numpy.ndarray.

Return type:

numpy.ndarray

Examples

>>> as_float_array([1, 2, 3])
array([1., 2., 3.])