title: why does numpy give the dimension mismatch error?
body: <p>I have a matrix I hold in a variable called M.
  I then use:</p>
  
  <pre><code> dist = np.dot(M[0], M[0])
  </code></pre>
  
  <p>and I always get the error eventually leading to:</p>
  
  <pre><code>  File "/usr/lib/python2.7/dist-packages/scipy/sparse/base.py", line 246, in __mul__
        raise ValueError('dimension mismatch')
    ValueError: dimension mismatch
  </code></pre>
  
  <p>I really don't understand how this statement could fail with dimension mismatch - I use the argument M[0] for both first and second array, they are of identical size.</p>