title: Creating an euclidean distance matrix of tensors
body: <p>I have 10000 of matrixes with the shape (32, 32, 3). I want to create an euclidean distance matrix between all the matrixes. At the end, it is going to be like,</p>
  
  <pre><code>[0, d2, d3, d4, ...]
  [d1, 0, d3, d4, ...]
  [d1, d2, 0, d4, ...]
  [d1, d2, d3, 0, ...]
  </code></pre>
  
  <p>How I can make it in the fastest way? I have tried the following, but it takes ages to finish.</p>
  
  <pre><code>import numpy as np
  dists = []
  for a in range(len(X_test)):
      dists.append([])
      for b in range(len(X_test)):
          dists[a].append(np.linalg.norm(X_test[a] - X_test[b]))
  print dists
  </code></pre>