def mask_indices(n, mask_func, k=0):
    m = np.ones((n, n), int)
    a = mask_func(m, k)
    return np.where(a != 0)
Return the indices to access (n,n) arrays, given a masking function.
dataset/ETHPy150Open nipy/nitime/nitime/utils.py/mask_indices