aboutsummaryrefslogtreecommitdiffstats
path: root/fg21sim
diff options
context:
space:
mode:
authorAaron LI <aly@aaronly.me>2018-01-22 20:19:03 +0800
committerAaron LI <aly@aaronly.me>2018-01-22 20:19:03 +0800
commitc6db288d1cc8d7f07f6b2c090781c386c3ee5792 (patch)
tree65f89d1ccb55a3ae200213fff9378343f3206ad9 /fg21sim
parentff9504cfc37362e67d1f6f88b35f6b5e4bdae24c (diff)
downloadfg21sim-c6db288d1cc8d7f07f6b2c090781c386c3ee5792.tar.bz2
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.
Diffstat (limited to 'fg21sim')
-rw-r--r--fg21sim/extragalactic/clusters/main.py12
1 files changed, 8 insertions, 4 deletions
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())