diff options
author | Daniel Friesel <derf@finalrewind.org> | 2019-02-07 07:49:05 +0100 |
---|---|---|
committer | Daniel Friesel <derf@finalrewind.org> | 2019-02-07 07:51:35 +0100 |
commit | 616b186e7b65b24eb4157a3d843de4c1e6ed5160 (patch) | |
tree | cd70f51234ab4cc6a53c932f7003fadd57c93aa7 /lib/dfatool.py | |
parent | 4f744632aff50723979f03fba66f968a6d194dd6 (diff) |
_try_fits: Do not throw error when encountering insufficient data for fitting
Diffstat (limited to 'lib/dfatool.py')
-rwxr-xr-x | lib/dfatool.py | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/dfatool.py b/lib/dfatool.py index 9653017..3048f43 100755 --- a/lib/dfatool.py +++ b/lib/dfatool.py @@ -696,6 +696,14 @@ def _try_fits(by_param, state_or_tran, model_attribute, param_index, safe_functi median_measures = aggregate_measures(np.median(Y), Y) ref_results['median'].append(median_measures['rmsd']) + if not len(ref_results['mean']): + # Insufficient data for fitting + return { + 'best' : None, + 'best_rmsd' : np.inf, + 'results' : results, + } + best_fit_val = np.inf best_fit_name = None for function_name, result in raw_results.items(): |