def _get_indices()

in common/spline.py [0:0]


    def _get_indices(self, distance):
        # Find spline segment via binary search
        indices = np.empty(len(distance), dtype=int)
        for k, dist in enumerate(distance):
            i = bisect.bisect_right(self.distances, dist) - 1
            # These checks apply only to the non-closed spline case
            if not self.closed:
                if i < 0:
                    i = 0
                if i == len(self.points) - 1:
                    i = len(self.points) - 2
            indices[k] = i
        return indices