csep.utils.calc.discretize(data, bin_edges, right_continuous=False)[source]

returns array with len(bin_edges) consisting of the discretized values from each bin. instead of returning the counts of each bin, this will return an array with values modified such that any value within bin_edges[0] <= x_new < bin_edges[1] ==> bin_edges[0].

This implementation forces you to define a bin edge that contains the data.