@staticmethod
def uniform_changepoints(T, n_inter):
    """Return optimal uniform changepoints for n intervals of data

        We have to deal with the special cases of divisions with rest
        for the intervals.

        Parameters
        ----------
        T : number of timesteps
        n_inter : number of intervals

        Returns
        -------
        changepoints : list[int]
            changepoint indices
        """
    raw_dist = T / n_inter
    fair_dist = round(raw_dist)
    if fair_dist < raw_dist:
        return range(fair_dist, T - fair_dist, fair_dist)
    else:
        return range(fair_dist, T, fair_dist)
