title: Using numpy to calculate a 2d point transformation but the cross product cant calculate,why?and how?
body: <p>calculate a 2d point P(2,1) transformation in homogenous coordinate.so P is (2,1,1)T.</p>
  <p>but NumPy error when I want to cross-product rotation matrix to P.the result should be a single column</p>
  <pre><code>import numpy as np
  import math as math
  p = np.reshape(np.array([2,1,1]),(3,1))
  #rotate 45 matrix
  
  r = np.eye(3)#identity
  r[0,0] = math.cos(45*math.pi/180)
  r[0,1] = -math.sin(45*math.pi/180)
  r[1,0] = math.sin(45*math.pi/180)
  r[1,1] = math.cos(45*math.pi/180)
  
  np.cross(p,r)
  </code></pre>
  <p><a href="https://i.stack.imgur.com/ldTbU.png" rel="nofollow noreferrer">enter image description here</a></p>