r"""Remove capacity along a path from flux network.

    Parameters
    ----------
    F : (M, M) scipy.sparse matrix
        The flux network (matrix of netflux values)
    path : list
        Reaction path

    Returns
    -------
    F : (M, M) scipy.sparse matrix
        The updated flux network

def remove_path(F, path):
    r"""Remove capacity along a path from flux network.

    Parameters
    ----------
    F : (M, M) scipy.sparse matrix
        The flux network (matrix of netflux values)
    path : list
        Reaction path

    Returns
    -------
    F : (M, M) scipy.sparse matrix
        The updated flux network

    """
    c = capacity(F, path)
    F = F.todok()
    L = len(path)
    for l in range(L - 1):
        i = path[l]
        j = path[l + 1]
        F[i, j] -= c
    return F