Commit 76716266 authored by John Douglas Veitch's avatar John Douglas Veitch
Browse files

Merge branch 'fix_nest2pos' into 'master'

Don't take the mean if not dealing with numbers

See merge request !379
parents ada34af7 074613a3
Pipeline #26546 passed with stages
in 156 minutes and 47 seconds
......@@ -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