r"""Compute eigenvectors of given transition matrix.

    Parameters
    ----------
    T : scipy.sparse matrix
        Transition matrix (stochastic matrix).
    k : int (optional) or array-like
        For integer k compute the first k eigenvalues of T
        else return those eigenvector sepcified by integer indices in k.
    right : bool, optional
        If True compute right eigenvectors, left eigenvectors otherwise
    ncv : int (optional)
        The number of Lanczos vectors generated, `ncv` must be greater than k;
        it is recommended that ncv > 2*k
    reversible : bool, optional
        Indicate that transition matrix is reversible
    mu : (M,) ndarray, optional
        Stationary distribution of T


    Returns
    -------
    eigvec : numpy.ndarray, shape=(d, n)
        The eigenvectors of T ordered with decreasing absolute value of
        the corresponding eigenvalue. If k is None then n=d, if k is
        int then n=k otherwise n is the length of the given indices array.

    Notes
    -----
    Eigenvectors are computed using the scipy interface
    to the corresponding ARPACK routines.

def eigenvectors(T, k=None, right=True, ncv=None, reversible=False, mu=None):
    r"""Compute eigenvectors of given transition matrix.

    Parameters
    ----------
    T : scipy.sparse matrix
        Transition matrix (stochastic matrix).
    k : int (optional) or array-like
        For integer k compute the first k eigenvalues of T
        else return those eigenvector sepcified by integer indices in k.
    right : bool, optional
        If True compute right eigenvectors, left eigenvectors otherwise
    ncv : int (optional)
        The number of Lanczos vectors generated, `ncv` must be greater than k;
        it is recommended that ncv > 2*k
    reversible : bool, optional
        Indicate that transition matrix is reversible
    mu : (M,) ndarray, optional
        Stationary distribution of T


    Returns
    -------
    eigvec : numpy.ndarray, shape=(d, n)
        The eigenvectors of T ordered with decreasing absolute value of
        the corresponding eigenvalue. If k is None then n=d, if k is
        int then n=k otherwise n is the length of the given indices array.

    Notes
    -----
    Eigenvectors are computed using the scipy interface
    to the corresponding ARPACK routines.

    """
    if k is None:
        raise ValueError("Number of eigenvectors required for decomposition of sparse matrix")
    else:
        if reversible:
            eigvec = eigenvectors_rev(T, k, right=right, ncv=ncv, mu=mu)
            return eigvec
        else:
            eigvec = eigenvectors_nrev(T, k, right=right, ncv=ncv)
            return eigvec