r"""Sensitivity matrix of the mean first-passage time from specified state.

    Parameters
    ----------
    T : (M, M) ndarray
        Transition matrix
    target : int or list
        Target state or set for mfpt computation
    i : int
        Compute the sensitivity for state `i`

    Returns
    -------
    S : (M, M) ndarray
        Sensitivity matrix for specified state

def mfpt_sensitivity(T, target, i):
    r"""Sensitivity matrix of the mean first-passage time from specified state.

    Parameters
    ----------
    T : (M, M) ndarray
        Transition matrix
    target : int or list
        Target state or set for mfpt computation
    i : int
        Compute the sensitivity for state `i`

    Returns
    -------
    S : (M, M) ndarray
        Sensitivity matrix for specified state

    """
    # check input
    T = _types.ensure_ndarray_or_sparse(T, ndim=2, uniform=True, kind='numeric')
    target = _types.ensure_int_vector(target)
    # go
    if _issparse(T):
        _showSparseConversionWarning()
        mfpt_sensitivity(T.todense(), target, i)
    else:
        return dense.sensitivity.mfpt_sensitivity(T, target, i)