summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Friesel <daniel.friesel@uos.de>2022-05-30 14:24:50 +0200
committerDaniel Friesel <daniel.friesel@uos.de>2022-05-30 14:24:50 +0200
commit509629740f782e11d22d7cf0c000bc0423782d7f (patch)
treec745eb75bb9270a9cf98e2e7b51a862b26d1367f
parentd6e999c6d14e008509339a6fa92beb8a1ce89f17 (diff)
_corr_by_param: catch TypeError as well
-rw-r--r--lib/parameters.py6
1 files changed, 2 insertions, 4 deletions
diff --git a/lib/parameters.py b/lib/parameters.py
index 095642f..300bb6f 100644
--- a/lib/parameters.py
+++ b/lib/parameters.py
@@ -153,10 +153,8 @@ def _corr_by_param(attribute_data, param_values, param_index):
# Building a correlation coefficient is pointless in this case
# -> assume no correlation
return 0.0
- except ValueError:
- logger.error(
- "ValueError in _corr_by_param(param_index={})".format(param_index)
- )
+ except (TypeError, ValueError) as e:
+ logger.error(f"{e} in _corr_by_param(param_index={param_index})")
logger.error(
"while executing np.corrcoef({}, {}))".format(
attribute_data, param_values