rankdata#
- named_arrays.stats.rankdata(a, axis=None, method='average', where=True)#
Assign ranks to the data along the given axis, dealing with ties according to the chosen method.
This is a
named_arraysimplementation ofscipy.stats.rankdata().- Parameters:
a (AT) – The input array to rank.
axis (None | str | Sequence[str]) – The axis or axes along which to compute the ranks. If
None(the default), the ranks are computed over a flattened version of all the axes.method (str) –
The convention used to assign ranks to tied values.
"average": The average of the ranks spanned by the tied values."min": The minimum of the ranks spanned by the tied values (also known as competition ranking)."max": The maximum of the ranks spanned by the tied values."dense": Like"min", but the rank of the next distinct value is always one greater than the previous group (no gaps).
where (bool | AbstractScalarArray) – A boolean mask selecting which elements to include in the ranking. Excluded elements are assigned a rank of NaN.
- Return type:
AT
See also
scipy.stats.rankdata()The equivalent Scipy function.