def cfg_scoresep(mat, val, op):
    "\n            Compares scores between different configs\n\n            op = operator.ge\n            is_success = prop2_mat['is_success']\n            "
    nCols = mat.shape[1]
    pdistx = vt.pdist_indicies(nCols)
    pdist_list = np.array([vt.safe_pdist(row) for row in mat])
    flags_list = op(pdist_list, val)
    colx_list = [np.unique(ut.flatten(ut.compress(pdistx, flags))) for flags in flags_list]
    offsets = np.arange(0, (nCols * len(mat)), step=nCols)
    idx_list = ut.flatten([(colx + offset) for (colx, offset) in zip(colx_list, offsets)])
    mask = vt.index_to_boolmask(idx_list, maxval=(offsets[(- 1)] + nCols))
    flags = mask.reshape(mat.shape)
    return flags
Compares scores between different configs

op = operator.ge
is_success = prop2_mat['is_success']
def cfg_scoresep(mat, val, op):
    "\n            Compares scores between different configs\n\n            op = operator.ge\n            is_success = prop2_mat['is_success']\n            "
    nCols = mat.shape[1]
    pdistx = vt.pdist_indicies(nCols)
    pdist_list = np.array([vt.safe_pdist(row) for row in mat])
    flags_list = op(pdist_list, val)
    colx_list = [np.unique(ut.flatten(ut.compress(pdistx, flags))) for flags in flags_list]
    offsets = np.arange(0, (nCols * len(mat)), step=nCols)
    idx_list = ut.flatten([(colx + offset) for (colx, offset) in zip(colx_list, offsets)])
    mask = vt.index_to_boolmask(idx_list, maxval=(offsets[(- 1)] + nCols))
    flags = mask.reshape(mat.shape)
    return flags