Commit f49a8ab6 authored by Moritz's avatar Moritz
Browse files

deepcopying PriorDicts does not work in python 2

parent 36339603
...@@ -2,7 +2,7 @@ from __future__ import division ...@@ -2,7 +2,7 @@ from __future__ import division
import os import os
from collections import OrderedDict, namedtuple from collections import OrderedDict, namedtuple
from copy import deepcopy from copy import copy
from distutils.version import LooseVersion from distutils.version import LooseVersion
from itertools import product from itertools import product
...@@ -1230,13 +1230,12 @@ class ResultList(list): ...@@ -1230,13 +1230,12 @@ class ResultList(list):
Return the combined results in a :class:bilby.core.result.Result` Return the combined results in a :class:bilby.core.result.Result`
object. object.
""" """
if len(self) == 0: if len(self) == 0:
return Result() return Result()
elif len(self) == 1: elif len(self) == 1:
return deepcopy(self[0]) return copy(self[0])
else: else:
result = deepcopy(self[0]) result = copy(self[0])
if result.label is not None: if result.label is not None:
result.label += 'combined' result.label += 'combined'
......
Markdown is supported
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