colour_hdri.hat_function#

colour_hdri.hat_function(a: ArrayLike) NDArrayFloat[source]#

Return given array weighted by a hat function.

Parameters:

a (ArrayLike) – Array to apply the weighting function onto.

Returns:

Weighted array.

Return type:

numpy.ndarray

Examples

>>> hat_function(np.linspace(0, 1, 10))
array([ 0.        ,  0.95099207,  0.99913557,  0.99999812,  1.        ,
        1.        ,  0.99999812,  0.99913557,  0.95099207,  0.        ])