rank_order_percentile

halotools.utils.rank_order_percentile(y)[source] [edit on github]

Return the rank-order percentile of the values of an input distribution y.

Parameters:

y : ndarray

Numpy array of shape (npts, ) storing an input distribution of values

Returns:

ranks : ndarray

Numpy array of shape (npts, ) storing the rank-order percentile of every value of the input y.

Examples

>>> percentile = rank_order_percentile(np.random.normal(size=int(1e2)))