create_rotation_matrix
- pyhelpers.ops.create_rotation_matrix(theta)
Create a rotation matrix (counterclockwise).
- Parameters:
theta (int or float) – rotation angle (in radian)
- Returns:
a rotation matrix of shape (2, 2)
- Return type:
numpy.ndarray
Examples:
>>> from pyhelpers.ops import create_rotation_matrix >>> rot_mat = create_rotation_matrix(theta=30) >>> rot_mat array([[-0.98803162, 0.15425145], [-0.15425145, -0.98803162]])