colour.utilities.has_only_nan#

colour.utilities.has_only_nan(a: ArrayLike) bool[source]#

Return whether given array \(a\) contains only NaN values.

Parameters:

a (ArrayLike) – Array \(a\) to check whether it contains only NaN values.

Returns:

Whether array \(a\) contains only NaN values.

Return type:

bool

Examples

>>> has_only_nan(None)
True
>>> has_only_nan([None, None])
True
>>> has_only_nan([True, None])
False
>>> has_only_nan([0.1, np.nan, 0.3])
False