rank_order_percentile

halotools.utils.rank_order_percentile(y)[source]

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

Parameters:
yndarray

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

Returns:
ranksndarray

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)))