title: Python Numpy.matrix multiplication error
body: <p>I’m taking an online machine learning class through Cousera.  The class is taught in Matlab but I’m trying to learn Python so I’m trying to rewrite the assignments in Python after I have the Matlab stuff done.  I have the following code:</p>
  
  <pre><code>import numpy as n
  
  X = n.matrix(dataX)
  theta = n.zeros(shape=(2, 1))
  predictions = n.matrix(X * theta)
  </code></pre>
  
  <p>X/dataX is a 97x2 matrix pulled in from a CSV.  Theta is a array 2x1 of zeros that I’m trying to multiply to X.  I should get 97x1 array of zeros to the output for predictions.  But I get the following error instead:</p>
  
  <pre><code>/Library/Frameworks/Python.framework/Versions/3.3/bin/python3 /Users/jsmith/Documents/python/Assign1/CostFunction.py
  Traceback (most recent call last):
    File "/Users/jsmith/Documents/python/Assign1/CostFunction.py", line 24, in &lt;module&gt;
      predictions = n.matrix(X * theta)
    File "/Library/Frameworks/Python.framework/Versions/3.3/lib/python3.3/site-packages/numpy/matrixlib/defmatrix.py", line 341, in __mul__
      return N.dot(self, asmatrix(other))
  ValueError: data type must provide an itemsize
  
  Process finished with exit code 1
  </code></pre>
  
  <p>I’ve also tried:</p>
  
  <pre><code>predictions = X * theta
  </code></pre>
  
  <p>And I get the same “ValueError: data type must provide an itemsize” error.  What am I doing wrong?</p>