summaryrefslogtreecommitdiff
path: root/lib/parameters.py
diff options
context:
space:
mode:
authorDaniel Friesel <daniel.friesel@uos.de>2022-05-30 14:23:35 +0200
committerDaniel Friesel <daniel.friesel@uos.de>2022-05-30 14:23:35 +0200
commitd6e999c6d14e008509339a6fa92beb8a1ce89f17 (patch)
treea417182096cba6971b243b075223de51df6f3287 /lib/parameters.py
parent0fbecb8779763d947a5fe881c5a21ac57f93bb35 (diff)
_corr_by_param: cast floaty strings to float
Diffstat (limited to 'lib/parameters.py')
-rw-r--r--lib/parameters.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/parameters.py b/lib/parameters.py
index 01b3e66..095642f 100644
--- a/lib/parameters.py
+++ b/lib/parameters.py
@@ -143,7 +143,9 @@ def _corr_by_param(attribute_data, param_values, param_index):
:param param_index: index of parameter in `by_name[*]['param']`
"""
if _all_params_are_numeric(param_values, param_index):
- param_values = np.array(list((map(lambda x: x[param_index], param_values))))
+ param_values = np.array(
+ list((map(lambda x: float(x[param_index]), param_values)))
+ )
try:
return np.corrcoef(attribute_data, param_values)[0, 1]
except FloatingPointError: