(u)
return np.array(dilations, dtype=np.int8).min(0)
IS operator.
IS operator.
IS operator .
def inf_sup(u):
    """IS operator."""

    if np.ndim(u) == 2:
        P = _P2
    elif np.ndim(u) == 3:
        P = _P3
    else:
        raise ValueError("u has an invalid number of dimensions "
                         "(should be 2 or 3)")

    dilations = []
    for P_i in P:
        dilations.append(ndi.binary_dilation(u, P_i))

    return np.array(dilations, dtype=np.int8).min(0)
def inf_sup ( u ) : if np . ndim ( u ) == 2 : P = _P2 elif np . ndim ( u ) == 3 : P = _P3 else : raise ValueError ( "u has an invalid number of dimensions " "(should be 2 or 3)" ) dilations = [ ] for P_i in P : dilations . append ( ndi . binary_dilation ( u , P_i ) ) return np . array ( dilations , dtype = np . int8 ) . min ( 0 )