Fast Implementation of Dynamic Time Warping for Python.
pip install pydtw
from pydtw import dtw1d import numpy as np a = np.random.rand(10) b = np.random.rand(15) cost_matrix, cost, alignment_a, alignment_b = dtw1d(a, b)
from pydtw import dtw2d import numpy as np a = np.random.rand(10, 4) b = np.random.rand(15, 4) cost_matrix, cost, alignment_a, alignment_b = dtw2d(a, b)