Commit 074613a3 authored by Salvatore Vitale's avatar Salvatore Vitale
Browse files

Don't take the mean if not dealing with numbers

parent ada34af7
......@@ -103,7 +103,7 @@ def read_nested_from_hdf5(nested_path_list):
# for metadata which is in a list, take the average.
for level in metadata:
for key in metadata[level]:
if isinstance(metadata[level][key], list):
if isinstance(metadata[level][key], list) and all(isinstance(x, (int,float)) for x in metadata[level][key]):
metadata[level][key] = mean(metadata[level][key])
log_noise_evidence = reduce(logaddexp, log_noise_evidences) - log(len(log_noise_evidences))
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment