verse.utils.utils.near_split

verse.utils.utils.near_split(x, num_bins=None, size_bins=None)

Split a number into several bins with near-even distribution.

You can either set the number of bins, or their size. The sum of bins always equals the total. :param x: number to split :param num_bins: number of bins :param size_bins: size of bins :return: list of bin sizes