From c6db288d1cc8d7f07f6b2c090781c386c3ee5792 Mon Sep 17 00:00:00 2001 From: Aaron LI Date: Mon, 22 Jan 2018 20:19:03 +0800 Subject: clusters: coerce to plain list for concatenation The "merger_mass1", "merger_mass2", "merger_z", and "merger_age" may be NumPy arrays, e.g., the catalog data are manually modified. --- fg21sim/extragalactic/clusters/main.py | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'fg21sim/extragalactic/clusters') diff --git a/fg21sim/extragalactic/clusters/main.py b/fg21sim/extragalactic/clusters/main.py index 2c8ac54..6a25506 100644 --- a/fg21sim/extragalactic/clusters/main.py +++ b/fg21sim/extragalactic/clusters/main.py @@ -394,10 +394,14 @@ class GalaxyClusters: if num == nmax: continue cdict.update([ - ("merger_mass1", cdict["merger_mass1"] + [None]*(nmax-num)), - ("merger_mass2", cdict["merger_mass2"] + [None]*(nmax-num)), - ("merger_z", cdict["merger_z"] + [None]*(nmax-num)), - ("merger_age", cdict["merger_age"] + [None]*(nmax-num)), + ("merger_mass1", + list(cdict["merger_mass1"]) + [None]*(nmax-num)), + ("merger_mass2", + list(cdict["merger_mass2"]) + [None]*(nmax-num)), + ("merger_z", + list(cdict["merger_z"]) + [None]*(nmax-num)), + ("merger_age", + list(cdict["merger_age"]) + [None]*(nmax-num)), ]) keys = list(self.catalog[0].keys()) -- cgit v1.2.2