colour.utilities.interval#
- colour.utilities.interval(distribution: ArrayLike, unique: bool = True) NDArray[source]#
Return the interval size of the specified distribution.
- Parameters:
- Returns:
Distribution interval.
- Return type:
Examples
Uniformly spaced variable:
>>> y = np.array([1, 2, 3, 4, 5]) >>> interval(y) array([ 1.]) >>> interval(y, False) array([ 1., 1., 1., 1.])
Non-uniformly spaced variable:
>>> y = np.array([1, 2, 3, 4, 8]) >>> interval(y) array([ 1., 4.]) >>> interval(y, False) array([ 1., 1., 1., 4.])