You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
the comoving attribute defaults to True. If we try to convert to physical units we get an exception because it tries to reference attributes of the cosmo_factor which is None, but trying to convert to comoving works fine. This seems dangerous, wouldn't it be better to default to None when the situation is ambiguous? Alternatively returning a unyt_array instead wouldn't be unreasonble, but is probably more confusing to someone expecting a comso_array. Could do it anyway and produce a warning.
Implementing this would need some checking that nothing in swiftsimio relies on the default. Test coverage might be good enough for issues to raise their head if it is relied on, but then again they might not ;)
The text was updated successfully, but these errors were encountered:
If we initialize a
cosmo_array
like this:the
comoving
attribute defaults toTrue
. If we try to convert to physical units we get an exception because it tries to reference attributes of thecosmo_factor
which isNone
, but trying to convert to comoving works fine. This seems dangerous, wouldn't it be better to default toNone
when the situation is ambiguous? Alternatively returning aunyt_array
instead wouldn't be unreasonble, but is probably more confusing to someone expecting acomso_array
. Could do it anyway and produce a warning.Implementing this would need some checking that nothing in swiftsimio relies on the default. Test coverage might be good enough for issues to raise their head if it is relied on, but then again they might not ;)
The text was updated successfully, but these errors were encountered: