colour.utilities.as_int_scalar#

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

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

Parameters:
Returns:

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

Return type:

int

Warning

Examples

>>> as_int_scalar(np.array(1))
1