diff --git a/swiftsimio/objects.py b/swiftsimio/objects.py index c1025334..0eaa1412 100644 --- a/swiftsimio/objects.py +++ b/swiftsimio/objects.py @@ -730,6 +730,17 @@ def __new__( cosmo_factor: cosmo_factor try: + obj = super().__new__( + cls, + input_array, + units=units, + registry=registry, + dtype=dtype, + bypass_validation=bypass_validation, + name=name, + ) + except TypeError: + # Older versions of unyt (before input_units was deprecated) obj = super().__new__( cls, input_array, @@ -741,7 +752,7 @@ def __new__( name=name, ) except TypeError: - # Older versions of unyt + # Even older versions of unyt (before name was added) obj = super().__new__( cls, input_array,