randomly_resort

halotools.empirical_models.randomly_resort(x, sigma, seed=None)[source] [edit on github]

Function randomizes the entries of x with an input level of stochasticity sigma.

Parameters:

x : ndarray

Input array of shape (npts, ) that will be randomly reordered

sigma : float

Input level of stochasticity in the randomization

seed : int, optional

Seed used to randomly add noise

Returns:

noisy_x : ndarray

Array of shape (npts, )