unsortedness

emlib.combinatorics.unsortedness(seq)[source]

The entropy of the ordering in this seq.

Parameters:

seq (Union[_Buffer, _SupportsArray[dtype[Any]], _NestedSequence[_SupportsArray[dtype[Any]]], bool, int, float, complex, str, bytes, _NestedSequence[bool | int | float | complex | str | bytes]]) – the seq to evaluate

Return type:

float

Returns:

a value between 0 and 1, where 0 means sorted and 1 means random order