Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
])
w = np.array([[np.inf, np.inf, 0., 0., 0., 0., np.inf, np.inf],
[np.inf, np.inf, 1.1, 1., 0., 0., np.inf, np.inf],
[np.inf, np.inf, 1.1, 1., 0., 0., np.inf, np.inf],
[np.inf, np.inf, 0., 0., 2., 2.2, np.inf, np.inf],
[np.inf, np.inf, 0., 0., 1., 1.1, np.inf, np.inf],
[np.inf, np.inf, 0., 0., 0., 0., np.inf, np.inf],
[np.inf, np.inf, 0., 0., 1.3, 1.43, np.inf, np.inf],
[np.inf, np.inf, 0., 0., 0., 0., np.inf, np.inf],
[np.inf, np.inf, 0., 0., 0., 0., np.inf, np.inf]])
d, paths = dtww.warping_paths(s[0], s[1], w, window=0)
path = dtw.best_path(paths)
if directory:
wp_fn = directory / "warping_paths.png"
dtwvis.plot_warpingpaths(s[0], s[1], paths, path, filename=wp_fn)