colour.utilities.is_integer#

colour.utilities.is_integer(a: Any) bool[source]#

Return whether given variable \(a\) is an numpy.integer-like variable under given threshold.

Parameters:

a (Any) – Variable \(a\) to test.

Returns:

Whether variable \(a\) is an numpy.integer-like variable.

Return type:

bool

Notes

  • The determination threshold is defined by the colour.algebra.common.INTEGER_THRESHOLD attribute.

Examples

>>> is_integer(1)
True
>>> is_integer(1.01)
False