Stream: general

Topic: cf_units question


view this post on Zulip Jim Edwards (Apr 18 2024 at 16:16):

Using cf_units v3.2.0 (latest)
from cf_units import Unit
d = Unit('days since 1850-01-01', calendar="gregorian")
print(d)

days since 1850-01-01
print(d.calendar)
standard

Why isn't d.calendar gregorian? Is this a bug?

view this post on Zulip Jim Edwards (Apr 18 2024 at 16:34):

Another issue with cf_units:

              result = result.astype(value.dtype)

E AttributeError: 'float' object has no attribute 'astype'

view this post on Zulip Keith Lindsay (Apr 18 2024 at 16:41):

Looking at cf-units docs, it looks like standard and gregorian are aliases.


Last updated: May 16 2025 at 17:14 UTC