title: ValueError: array is not broadcastable to correct shape
body: <p>I am probably missing something obvious but I am stuck on this:</p>
  
  <p>Inside <code>ipdb</code> session I was able to reduce my problem to this:</p>
  
  <pre><code>ipdb&gt; type(scores)
  &lt;class 'numpy.matrixlib.defmatrix.matrix'&gt;
  ipdb&gt; scores.shape
  (23073, 50)
  ipdb&gt; scores[np.arange(scores.shape[0]), np.zeros(scores.shape[0], dtype=np.int)] += 10
  *** ValueError: array is not broadcastable to correct shape
  ipdb&gt; scores.dtype
  dtype('float64')
  </code></pre>
  
  <p>I was not able to reproduce this problem with at simple example:</p>
  
  <pre><code>In [24]: a = np.matrix(np.zeros((6,4))
  )
  
  In [25]: a[np.arange(a.shape[0]), np.zeros(a.shape[0], dtype=np.int)] += 10
  
  In [26]: a
  Out[26]: 
  matrix([[ 10.,   0.,   0.,   0.],
          [ 10.,   0.,   0.,   0.],
          [ 10.,   0.,   0.,   0.],
          [ 10.,   0.,   0.,   0.],
          [ 10.,   0.,   0.,   0.],
          [ 10.,   0.,   0.,   0.]])
  
  In [27]: a.dtype
  Out[27]: dtype('float64')
  </code></pre>
  
  <p>Any ideas what could be going on? What should I check?</p>