ranks
ranks(x)Ranks of a sample.
Mirrors the C# Statistics.RanksInPlace(double[]): tied values (exact equality) receive the average rank of their run.
Parameters
| Name | Type | Description | Default |
|---|---|---|---|
| x | array_like | required |
Returns
| Name | Type | Description |
|---|---|---|
| numpy.ndarray | Same length and order as x. |
Examples
>>> from corehydropy import ranks
>>> ranks([3, 1, 2, 1])
array([4. , 1.5, 3. , 1.5])