def rotation_2d(points, angles):
    'rotation 2d points based on origin point clockwise when angle positive.\n\n    Args:\n        points (float array, shape=[N, point_size, 2]): points to be rotated.\n        angles (float array, shape=[N]): rotation angle.\n\n    Returns:\n        float array: same shape as points\n    '
    rot_sin = np.sin(angles)
    rot_cos = np.cos(angles)
    rot_mat_T = np.stack([[rot_cos, (- rot_sin)], [rot_sin, rot_cos]])
    return np.einsum('aij,jka->aik', points, rot_mat_T)
rotation 2d points based on origin point clockwise when angle positive.

Args:
    points (float array, shape=[N, point_size, 2]): points to be rotated.
    angles (float array, shape=[N]): rotation angle.

Returns:
    float array: same shape as points
def rotation_2d(points, angles):
    'rotation 2d points based on origin point clockwise when angle positive.\n\n    Args:\n        points (float array, shape=[N, point_size, 2]): points to be rotated.\n        angles (float array, shape=[N]): rotation angle.\n\n    Returns:\n        float array: same shape as points\n    '
    rot_sin = np.sin(angles)
    rot_cos = np.cos(angles)
    rot_mat_T = np.stack([[rot_cos, (- rot_sin)], [rot_sin, rot_cos]])
    return np.einsum('aij,jka->aik', points, rot_mat_T)