Esempio n. 1
0
def test_visualisation_a():
    s1 = np.array([[0, 0], [0, 1], [2, 1], [0, 1], [0, 0]], dtype=np.double)
    s2 = np.array([[0, 0], [2, 1], [0, 1], [0, .5], [0, 0]], dtype=np.double)
    d1p, paths = dtw_ndim.warping_paths(s1, s2)
    path = dtw.best_path(paths)
    fig, ax = dtwvis.plot_warping(s1, s2, path)
    fig.show()
Esempio n. 2
0
def test_visualisation_a():
    with util_numpy.test_uses_numpy() as np:
        s1 = np.array([[0, 0], [0, 1], [2, 1], [0, 1], [0, 0]], dtype=np.double)
        s2 = np.array([[0, 0], [2, 1], [0, 1], [0, .5], [0, 0]], dtype=np.double)
        d1p, paths = dtw_ndim.warping_paths(s1, s2)
        path = dtw.best_path(paths)
        if not dtwvis.test_without_visualization():
            fig, ax = dtwndimvis.plot_warping(s1, s2, path)
            fig.show()