title: Rotation of a 2D array over an angle using rotation matrix
body: <p>What I want to do is to rotate a 2D numpy array over a given angle. The approach I'm taking is using a rotation matrix. The rotation matrix I defined as:</p>
  
  <pre><code>angle = 65.
  theta = (angle/180.) * numpy.pi
  
  rotMatrix = numpy.array([[numpy.cos(theta), -numpy.sin(theta)], 
                           [numpy.sin(theta),  numpy.cos(theta)]])
  </code></pre>
  
  <p>The matrix I want to rotate is shaped (1002,1004). However, just for testing purposes I created a 2D array with shape (7,6)</p>
  
  <pre><code>c = numpy.array([[0,0,6,0,6,0], [0,0,0,8,7,0], [0,0,0,0,5,0], [0,0,0,3,4,0], [0,0,2,0,1,0], [0,8,0,0,9,0], [0,0,0,0,15,0]])
  </code></pre>
  
  <p>Now, when I apply the rotation matrix on my 2D array I get the following error:</p>
  
  <pre><code>c = numpy.dot(rotMatrix, c)
  print c
  
  c = numpy.dot(rotMatrix, c)
  ValueError: matrices are not aligned
  Exception in thread Thread-1 (most likely raised during interpreter shutdown):
  </code></pre>
  
  <p>What am I doing wrong?</p>