title: np.linalg.norm on multiple rows in array
body: <p>I'm trying to get the magnitude of each vector in an array that looks like this ; </p>
  
  <pre><code>[[0.1,1.0,2.0]
  [0.5,2.0,1.0]
  [0.4,3.0,0.5]]
  </code></pre>
  
  <p>I want to put these into a new numpy array like this ;</p>
  
  <pre><code>[[1.2]
  [2.0]
  [2.1]]
  </code></pre>
  
  <p>Currently i'm doing this with a loop;</p>
  
  <pre><code>for i in range(x)):
      d = vec2[i] - vec1[i]
      dist[i] = np.linalg.norm(d)
  
  </code></pre>
  
  <p>However i'd like to do this with pure numpy ( the above are numpy arrays)
  Is there a way i'm missing to do this on a single line?
  This does not work, as the values I get are not identical;</p>
  
  <pre><code>d = vec2 - vec1
  dist = np.linalg.norm(d, axis=1)
  </code></pre>