(angle, axis)
return R.float()
r"""Returns a 4x4 rotation matrix that performs a rotation around axis by angle

    Parameters
    ----------
    angle : float
        Angle to rotate by
    axis: np.ndarray
        Axis to rotate about

    Returns
    -------
    torch.Tensor
        3x3 rotation matrix
r"""Returns a 4x4 rotation matrix that performs a rotation around axis by angle
r Returns a 4x4 rotation matrix that performs a rotation around axis by angle
def angle_axis(angle, axis):
    # type: (float, np.ndarray) -> float
    r"""Returns a 4x4 rotation matrix that performs a rotation around axis by angle

    Parameters
    ----------
    angle : float
        Angle to rotate by
    axis: np.ndarray
        Axis to rotate about

    Returns
    -------
    torch.Tensor
        3x3 rotation matrix
    """
    u = axis / np.linalg.norm(axis)
    cosval, sinval = np.cos(angle), np.sin(angle)

    # yapf: disable
    cross_prod_mat = np.array([[0.0, -u[2], u[1]],
                                [u[2], 0.0, -u[0]],
                                [-u[1], u[0], 0.0]])

    R = torch.from_numpy(
        cosval * np.eye(3)
        + sinval * cross_prod_mat
        + (1.0 - cosval) * np.outer(u, u)
    )
    # yapf: enable
    return R.float()
def angle_axis ( angle , axis ) : # type: (float, np.ndarray) -> float u = axis / np . linalg . norm ( axis ) cosval , sinval = np . cos ( angle ) , np . sin ( angle ) # yapf: disable cross_prod_mat = np . array ( [ [ 0.0 , - u [ 2 ] , u [ 1 ] ] , [ u [ 2 ] , 0.0 , - u [ 0 ] ] , [ - u [ 1 ] , u [ 0 ] , 0.0 ] ] ) R = torch . from_numpy ( cosval * np . eye ( 3 ) + sinval * cross_prod_mat + ( 1.0 - cosval ) * np . outer ( u , u ) ) # yapf: enable return R . float ( )