def so2_feature_to_ambient_vector(v, frames):
    """
    Transform rho_0 + rho_1 feature into ambient 3-vector using frame.

    :param v: [N, C, 3]
    :param frames: [N, 3, 3]  for each point, rows are X, Y, normal vectors
    :return: [N, C, 3]
    """
    return v[:, :, [1, 2, 0]] @ frames