Skip to content
Snippets Groups Projects
Commit f49a8ab6 authored by Moritz's avatar Moritz
Browse files

deepcopying PriorDicts does not work in python 2

parent 36339603
No related branches found
No related tags found
1 merge request!459Combining results
......@@ -2,7 +2,7 @@ from __future__ import division
import os
from collections import OrderedDict, namedtuple
from copy import deepcopy
from copy import copy
from distutils.version import LooseVersion
from itertools import product
......@@ -1230,13 +1230,12 @@ class ResultList(list):
Return the combined results in a :class:bilby.core.result.Result`
object.
"""
if len(self) == 0:
return Result()
elif len(self) == 1:
return deepcopy(self[0])
return copy(self[0])
else:
result = deepcopy(self[0])
result = copy(self[0])
if result.label is not None:
result.label += 'combined'
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment