title: How can I convert an ndarray to a matrix in scipy?
body: <p>How can I convert an ndarray to a matrix in numpy?  I'm trying to import data from a csv and turn it into a matrix.</p>
  
  <pre><code>from numpy import array, matrix, recfromcsv
  my_vars = ['docid','coderid','answer1','answer2']
  toy_data = matrix( array( recfromcsv('toy_data.csv', names=True)[my_vars] ) )
  print toy_data
  print toy_data.shape
  </code></pre>
  
  <p>But I get this:</p>
  
  <pre><code>[[(1, 1, 3, 3) (1, 2, 4, 1) (1, 3, 7, 2) (2, 1, 3, 3) (2, 2, 4, 4)
    (2, 4, 3, 1) (3, 1, 3, 3) (3, 2, 4, 3) (3, 3, 3, 4) (4, 4, 5, 1)
    (4, 5, 6, 2) (4, 2, 4, 3) (5, 2, 5, 4) (5, 3, 3, 1) (5, 4, 7, 2)
    (6, 1, 3, 3) (6, 5, 4, 1) (6, 2, 5, 2)]]
  (1, 18)
  </code></pre>
  
  <p>What do I have to do to get a 4 by 18 matrix out of this code?  There's got to be an easy answer to this question, but I just can't find it.</p>