You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
for pname in out['posterior_samples'].keys():
if 'sigma_w_rv' == pname[:10]:
instrument = pname.split('_')[-1]
out['posterior_samples']['sigma_w_'+instrument] = out['posterior_samples'][pname]
That last line is effectively modifying the dictionary you're currently iterating through in the case where RV datasets are analysed, this induces the error RuntimeError: dictionary changed size during iteration
This error is showing up when reading the output of runs made with Juliet before it became a package
I fixed it by changing it like this:
out_new = dict()
out_new['posterior_samples'] = dict()
for pname in out['posterior_samples'].keys():
if 'sigma_w_rv' == pname[:10]:
instrument = pname.split('_')[-1]
out_new['posterior_samples']['sigma_w_'+instrument] = out['posterior_samples'][pname]
for pname in out_new['posterior_samples'].keys():
out['posterior_samples'][pname] = out_new['posterior_samples'][pname]
It's just an ad-hoc solution though. I'll open a PR for this, just in case.
Cheers,
The text was updated successfully, but these errors were encountered:
Hey @jvines --- thanks for this! I'll take a deeper look soon to this to include it. Marking it as an "enhancement" because in theory, the new and old versions of juliet are different codes.
Hi,
In fit.py, line 1303, you have the following:
That last line is effectively modifying the dictionary you're currently iterating through in the case where RV datasets are analysed, this induces the error
RuntimeError: dictionary changed size during iteration
This error is showing up when reading the output of runs made with Juliet before it became a package
I fixed it by changing it like this:
It's just an ad-hoc solution though. I'll open a PR for this, just in case.
Cheers,
The text was updated successfully, but these errors were encountered: