def d(): return dtw_c.distance(s1, s2)
def test_distance1_c(): s1 = np.array([0., 0, 1, 2, 1, 0, 1, 0, 0]) s2 = np.array([0, 1, 2, 0, 0, 0, 0, 0, 0], dtype=np.double) d3 = dtw_c.distance(s1, s2) assert(d3) == pytest.approx(math.sqrt(2))