title: Understanding numpy.linalg.norm() in IPython
body: <p>I'm creating a linear regression model for supervised learning.</p>
  
  <p>I have a bunch of data points plotted on a graph (x1, y1), (x2, y2), (x3, y3), etc, where the x's are the real data and the y values are the training data values.</p>
  
  <p>As part of the next step in writing a basic nearest neighbor algorithm, I want to create a distance metric to measure the distance (and similarity) between two instances.</p>
  
  <p>If I wanted to write a generic function to compute the L-Norm distance in ipython, I know that a lot of people use numpy.linalg.norm(arr, ord = , axis=). What I'm confused about is how to format my array of data points so that it properly calculates the L-norm values.</p>
  
  <p>If I had just two data points, say (3, 4) and (5, 9), would my array need to look like this with each data point's values in one row?</p>
  
  <pre><code>arry = ([[3,4] 
           [5,9]])
  </code></pre>
  
  <p>or would it need to look like this where all the x-axis values are in one row and y in another?</p>
  
  <pre><code>arry = ([[3,5]
           [4,9]])
  </code></pre>