title: Unpacking elements of a numpy matrix
body: <p>I am trying to build a matrix from a text file that has entries as:</p>
  
  <pre><code>  45.0  0.00173  -0.0227 ...
    45.07 0.00173  -0.00227 ...
    .
    .
    .
  </code></pre>
  
  <p>So far, I've read the file lines:  </p>
  
  <pre><code>with open(os.path.join(dirs,fil),"r") as deck:
              deck_lines=deck.readlines()
  </code></pre>
  
  <p>And got my required rows using:</p>
  
  <pre><code> freq_chan = deck_lines[6+int(no_nodes):len(deck_lines)]
  </code></pre>
  
  <p>And got the values into a matrix:</p>
  
  <pre><code>freq_chan = np.matrix([i.split() for i in freq_chan]).astype(np.float)
  </code></pre>
  
  <p>But when I try to extract columns from the matrix, it seems that each element is read as a matrix:</p>
  
  <pre><code>  values = freq_chan[:,0]
    print(values)
  </code></pre>
  
  <p>produces:</p>
  
  <pre><code>[[45.0]
  [45.07]
   .
   .
   .]]
  </code></pre>
  
  <p>But what I want is [45.0, 45.07, ...]</p>
  
  <p>Is there a way to unpack the elements, perhaps using a for loop.</p>