transform
# for example, choose red, blue, green points in above wiki image
point1 = np.float32([[0,0], [img.shape...[1],0], [0,img.shape[0]]])
point2 = np.float32([[0,0], [img.shape[1],0], [img.shape[0]*np.tan(theta),...img.shape[0]]])
M_shear = cv2.getAffineTransform(point1, point2)
# shear equals to M_shear
sheared_point