(angle, axis=0)
return mat
Return a rotation matrix.
    
    Arguments:
      * angle: the angle of the rotation, in radians.
      * axis=0: the axis around which the rotation is made. It can be
        0 (rotation around x), 1 (rotation around y), 2 (rotation around z).
    
    Returns:
      * R: the 4x4 rotation matrix.
Return a rotation matrix.
    
    Arguments:
      * angle: the angle of the rotation, in radians.
      * axis=0: the axis around which the rotation is made. It can be
        0 (rotation around x), 1 (rotation around y), 2 (rotation around z).
    
    Returns:
      * R: the 4x4 rotation matrix.
Return a rotation matrix . Arguments : * angle : the angle of the rotation in radians . * axis = 0 : the axis around which the rotation is made . It can be 0 ( rotation around x ) 1 ( rotation around y ) 2 ( rotation around z ) . Returns : * R : the 4x4 rotation matrix .
def rotation_matrix(angle, axis=0):
    """Return a rotation matrix.
    
    Arguments:
      * angle: the angle of the rotation, in radians.
      * axis=0: the axis around which the rotation is made. It can be
        0 (rotation around x), 1 (rotation around y), 2 (rotation around z).
    
    Returns:
      * R: the 4x4 rotation matrix.
    
    """
    mat = np.eye(4)
    ind = np.array(sorted(list(set(range(3)).difference([axis]))))
    mat[np.ix_(ind,ind)] = np.array([[np.cos(angle), np.sin(angle)],
                               [-np.sin(angle), np.cos(angle)]])
    return mat
def rotation_matrix ( angle , axis = 0 ) : mat = np . eye ( 4 ) ind = np . array ( sorted ( list ( set ( range ( 3 ) ) . difference ( [ axis ] ) ) ) ) mat [ np . ix_ ( ind , ind ) ] = np . array ( [ [ np . cos ( angle ) , np . sin ( angle ) ] , [ - np . sin ( angle ) , np . cos ( angle ) ] ] ) return mat