title: How to get distance matrix using dynamic time warping?
body: <p>I have 6 time series values as follows.</p>
  <pre><code>import numpy as np
  series = np.array([
       [0., 0, 1, 2, 1, 0, 1, 0, 0],
       [0., 1, 2, 0, 0, 0, 0, 0, 0],
       [1., 2, 0, 0, 0, 0, 0, 1, 1],
       [0., 0, 1, 2, 1, 0, 1, 0, 0],
       [0., 1, 2, 0, 0, 0, 0, 0, 0],
       [1., 2, 0, 0, 0, 0, 0, 1, 1]])
  </code></pre>
  <p>Suppose, I want to get the distance matrix of dynamic time warping to perform a clustering. I used <code>dtaidistance</code> library for that as follows.</p>
  <pre><code>from dtaidistance import dtw
  ds = dtw.distance_matrix_fast(series)
  </code></pre>
  <p>The output I got was as follows.</p>
  <pre><code>array([[       inf, 1.41421356, 2.23606798, 0.        , 1.41421356, 2.23606798],
         [       inf,        inf, 1.73205081, 1.41421356, 0.        , 1.73205081],
         [       inf,        inf,        inf, 2.23606798, 1.73205081, 0.        ],
         [       inf,        inf,        inf,        inf, 1.41421356, 2.23606798],
         [       inf,        inf,        inf,        inf,        inf, 1.73205081],
         [       inf,        inf,        inf,        inf,        inf,        inf]])
  </code></pre>
  <p>It seems to me that the output I get is wrong. For instance, as I understand the diagonal values of the ouput should be <code>0</code> (since they are ideal matches).</p>
  <p>I want to know where I am making things wrong and how to fix it. I am also happy to get answers using other python libraries too.</p>
  <p>I am happy to provide more details if needed.</p>