colour.utilities.as_int_array#

colour.utilities.as_int_array(a: ArrayLike, dtype: Type[DTypeInt] | None = None) NDArrayInt[source]#

Convert the specified variable \(a\) to numpy.ndarray using the specified integer numpy.dtype.

Parameters:
Returns:

Variable \(a\) converted to integer numpy.ndarray.

Return type:

numpy.ndarray

Examples

>>> as_int_array([1.0, 2.0, 3.0])
array([1, 2, 3]...)