Given a 1-D numeric array of length n with no ties, return a float array of percentile ranks:
n
rank / (n - 1)
[0, 1]
Input
[30. 10. 20. 40.]
Output
[0.66666667 0. 0.33333333 1. ]
This one's part of Premium. Unlock the full NumPy track plus every other premium problem on the site.
solve(...)