l_moments

l_moments(x)

L-moments of a sample.

Mirrors the C# Statistics.LinearMoments. Requires at least 4 observations (returns nan otherwise, matching the C# behavior).

Parameters

Name Type Description Default
x array_like required

Returns

Name Type Description
dict Keys l1 (L-mean), l2 (L-scale), t3 (L-skewness), t4 (L-kurtosis).

Examples

>>> from corehydropy import l_moments
>>> round(l_moments([2.1, 3.4, 1.8, 4.9, 3.3, 2.7, 5.1, 3.9])["l1"], 4)
3.4