colour.utilities.in_array#
- colour.utilities.in_array(a: ArrayLike, b: ArrayLike, tolerance: Real = EPSILON) NDArray[source]#
Determine whether each element of array \(a\) is present in array \(b\) within the specified tolerance.
- Parameters:
- Returns:
Boolean array with array \(a\) shape indicating whether each element of array \(a\) is present in array \(b\) within the specified tolerance.
- Return type:
References
[Yor14]
Examples
>>> a = np.array([0.50, 0.60]) >>> b = np.linspace(0, 10, 101) >>> np.isin(a, b) array([ True, False], dtype=bool) >>> in_array(a, b) array([ True, True], dtype=bool)