scripts/model_utils.py
def ind_to_pair(ind, N):
    """
    Convert index (k,) to a pair index (i, j) for neural population correlation
    """
    a = ind
    k = 1
    while a >= 0:
        a -= (N-k)
        k += 1
        
    n = k-1
    m = N-n + a
    return n-1, m

    Convert index (k,) to a pair index (i, j) for neural population correlation
    
Convert index (k,) to a pair index (i, j) for neural population correlation
Convert index ( k ) to a pair index ( i j ) for neural population correlation
def ind_to_pair(ind, N):
    a = ind
    k = 1
    while a >= 0:
        a -= (N-k)
        k += 1
    n = k-1
    m = N-n + a
    return n-1, m
def ind_to_pair ( ind , N ) : a = ind k = 1 while a >= 0 : a -= ( N - k ) k += 1 n = k - 1 m = N - n + a return n - 1 , m
Convert index (k,) to a pair index (i, j) for neural population correlation
Convert index ( k ) to a pair index ( i j ) for neural population correlation
"""
    Convert index (k,) to a pair index (i, j) for neural population correlation
    """
ind
N