colour.utilities.as_float_array

colour.utilities.as_float_array(a)[source]

Converts given \(a\) variable to ndarray using the type defined by colour.constant.DEFAULT_FLOAT_DTYPE attribute.

Parameters:a (object) – Variable to convert.
Returns:\(a\) variable converted to ndarray.
Return type:ndarray

Examples

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