python rotate matrix code example
Example 1: rotate matrix python
numpy.rot90(array, k=number_rotations, axes=(0, 1))
Example 2: Make Rotation matrix in Python
In [x]: theta = np.radians(30)
In [x]: c, s = np.cos(theta), np.sin(theta)
In [x]: R = np.array(((c, -s), (s, c)))
Out[x]: print(R)
[[ 0.8660254 -0.5 ]
[ 0.5 0.8660254]]