A Python implementation of FastDTW
Switch branches/tags
Nothing to show
Clone or download
Type Name Latest commit message Commit time
Failed to load latest commit information.
fastdtw replace np.float with np.floating to mitigate FutureWarning (#19) Sep 16, 2018
tests add checks for dist=None (#6) Nov 11, 2016
.gitignore Small refactoring Sep 4, 2016
LICENSE Initial commit Mar 6, 2015
MANIFEST.in Add MANIFEST.in Nov 27, 2016
README.rst Edit README Mar 15, 2016
requirements.txt add cython Sep 4, 2016
setup.cfg add cython Sep 4, 2016
setup.py Update version to 0.3.2 Jul 16, 2017



Python implementation of FastDTW [1], which is an approximate Dynamic Time Warping (DTW) algorithm that provides optimal or near-optimal alignments with an O(N) time and memory complexity.


pip install fastdtw


import numpy as np
from scipy.spatial.distance import euclidean

from fastdtw import fastdtw

x = np.array([[1,1], [2,2], [3,3], [4,4], [5,5]])
y = np.array([[2,2], [3,3], [4,4]])
distance, path = fastdtw(x, y, dist=euclidean)


[1]Stan Salvador, and Philip Chan. "FastDTW: Toward accurate dynamic time warping in linear time and space." Intelligent Data Analysis 11.5 (2007): 561-580.