File tree Expand file tree Collapse file tree 1 file changed +13
-7
lines changed
Expand file tree Collapse file tree 1 file changed +13
-7
lines changed Original file line number Diff line number Diff line change @@ -467,15 +467,21 @@ def gen_group_results_str(group, concise=False):
467467 'Peak Parameters (\' {}\' mode) {} total peaks found' .format (\
468468 group .modes .periodic .name , sum (group .results .n_peaks )),
469469 '' ,
470+ ]
470471
471- 'Model metrics:' ,
472- * ['{:>18s} - Min: {:6.3f}, Max: {:6.3f}, Mean: {:5.3f}' .format (\
473- '{:s} ({:s})' .format (* label .split ('_' )),
474- * compute_arr_desc (group .results .get_metrics (label ))) \
475- for label in group .results .metrics .labels ],
476- '' ,
472+ if len (group .results .metrics ) > 0 :
473+ str_lst .extend ([
474+ 'Model metrics:' ,
475+ * ['{:>18s} - Min: {:6.3f}, Max: {:6.3f}, Mean: {:5.3f}' .format (\
476+ '{:s} ({:s})' .format (* label .split ('_' )),
477+ * compute_arr_desc (group .results .get_metrics (label ))) \
478+ for label in group .results .metrics .labels ],
479+ '' ,
480+ ])
481+
482+ str_lst .extend ([
477483 DIVIDER ,
478- ]
484+ ])
479485
480486 output = _format (str_lst , concise )
481487
You can’t perform that action at this time.
0 commit comments