Open sofeasible opened 1 year ago
I haven't tested this, but this or something close should convert from the numpy array theta_lclc
to a dict theta_lclc_dict
:
theta_lclc_dict = []
for l in range(L):
for m in range(C):
for k in range(i,L):
for n in range(C):
c = alphabet[n]
d = alphabet[m]
var_name = f'theta_{l}{c}{k}{d}'
theta_lclc_dict[var_name] = theta_lclc[l,m,k,n]
Thanks, that works!
Hi, would it be possible to output the pairwise thetas (theta_lclc) in a dictionary or pandas dataframe? Thank you!