def __calc_s(self, x, y):
    dx = np.diff(x)
    dy = np.diff(y)
    self.ds = np.hypot(dx, dy)
    s = [0]
    s.extend(np.cumsum(self.ds))
    return s
def __calc_s(self, x, y):
    dx = np.diff(x)
    dy = np.diff(y)
    self.ds = np.hypot(dx, dy)
    s = [0]
    s.extend(np.cumsum(self.ds))
    return s