def _get_lowTriIDs(K): if K in lowTriIDsDict: return lowTriIDsDict[K] else: ltIDs = np.tril_indices(K) lowTriIDsDict[K] = ltIDs return ltIDs