tacco.utils.get_balanced_separated_intervals

get_balanced_separated_intervals(points, n_intervals, minimum_separation, check_splits=True)[source]

Find the approximations of intervals with equal number of points in each interval which keep a specified minimum separation between them.

Parameters:
  • points – A ndarray with shape N_points.

  • n_intervals – The number of intervals to distribute the points into.

  • minimum_separation – The minimum separation between the intervals.

  • check_splits – Whether to warn about unusual split properties

Returns:

A ndarray of shape N_points containg integers giving either the index of the interval the point was put into or -1 for points falling into the separations between the intervals.