From abd4ed586893f840aa41ef0b8bdc304736e54c20 Mon Sep 17 00:00:00 2001 From: robjmcgibbon Date: Tue, 8 Oct 2024 12:24:08 +0200 Subject: [PATCH] Update mass table initialisation --- swiftsimio/metadata/objects.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/swiftsimio/metadata/objects.py b/swiftsimio/metadata/objects.py index b47a7938..db0cdcec 100644 --- a/swiftsimio/metadata/objects.py +++ b/swiftsimio/metadata/objects.py @@ -377,7 +377,9 @@ def __init__(self, base_mass_table: np.array, mass_units: unyt.unyt_quantity): # TODO: Extract these names from the files themselves if possible. - for index, name in metadata.particle_types.particle_name_underscores.items(): + for index, name in enumerate( + metadata.particle_types.particle_name_underscores.values() + ): try: setattr( self,