(points, angles)
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
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.
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 .
def rotation_2d(points, angles):
    """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
    """
    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)
def rotation_2d ( points , angles ) : 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 )