Bins_array_create

cosmo_utils.utils.stats_funcs.Bins_array_create(arr, base=10, return_tuple=False)[source] [edit on github]

Generates an evenly-spaced array between the minimum and maximum value of a given array,

Parameters:

arr : array_like

Array of of numbers or floats

base : int or float, optional

Interval used to create the evenly-spaced array of elements

return_tuple : bool, optional

If True, the function returns a set of tuples for each bin. This variable is set to False by default.

Returns:

bins_arr : numpy.ndarray

Array of elements separated in intervals of base