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
It seems that the latest version of cftime always returns cftime objects, which means that the cf-units documentation is no longer correct and the default behaviour has changed.
Specifically, the only_use_cftime_datetimes option in cftime.num2date defaults to True. I would argue that the cf-units call to this function should set this to be False for the meantime to maintain the current documented expectation that it should return python datetimes where possible. In a future major release it would be better to allow this option (and the accompanying only_use_python_datetimes option) to be passed down the call stack.
The text was updated successfully, but these errors were encountered:
Hi @duncanwp, I've requested some time within my team (which includes several cf-units contributors) to take a look at this. But it's difficult to tell when this will happen, so feel free to put up a PR if you have the time 🙂
It seems that the latest version of
cftime
always returns cftime objects, which means that the cf-units documentation is no longer correct and the default behaviour has changed.Specifically, the
only_use_cftime_datetimes
option incftime.num2date
defaults toTrue
. I would argue that the cf-units call to this function should set this to beFalse
for the meantime to maintain the current documented expectation that it should return python datetimes where possible. In a future major release it would be better to allow this option (and the accompanyingonly_use_python_datetimes
option) to be passed down the call stack.The text was updated successfully, but these errors were encountered: