title: Python: Convert xlrd sheet to numpy matrix (ndarray)
body: <p>What is the conversion syntax to convert a successfully loaded xlrd excel sheet to a numpy matrix (that represents that sheet)?</p>
  
  <p>Right now I'm trying to take each row of the spreadsheet and add it to the numpy matrix. I can't figure out the syntax for converting a Sheet.row into a numpy.ndarray. Here's what I've tried so far:</p>
  
  <pre><code>import xlrd
  workbook = xlrd.open_workbook('input.xlsx')
  worksheet = workbook.sheet_by_name('Sheet1')
  num_rows = worksheet.nrows - 1
  num_cells = worksheet.ncols - 1
  inputData = numpy.empty([worksheet.nrows - 1, worksheet.ncols])
  curr_row = -1
  while curr_row &lt; num_rows: # for each row
      curr_row += 1
      row = worksheet.row(curr_row)
      if curr_row &gt; 0: # don't want the first row because those are labels
          inputData[curr_row - 1] = numpy.array(row)
  </code></pre>
  
  <p>I've tried all sorts of things on that last line to try to convert the row to something numpy will accept and add to the inputData matrix. What is the correct conversion syntax?</p>