-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Don't convert data with time units to timedeltas by default #843
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
@shoyer is this what you have in mid? Replacing if decode_datetimes and 'units' in attributes and 'since' in attributes['units']:
units = pop_to(attributes, encoding, 'units')
calendar = pop_to(attributes, encoding, 'calendar')
data = DecodedCFDatetimeArray(data, units, calendar)
if decode_timedelta and attributes['units'] in TIME_UNITS:
units = pop_to(attributes, encoding, 'units')
data = DecodedCFTimedeltaArray(data, units) To be honest I cannot see why someone might want to convert time data to a Do you have any advice? (I would like to try this before you release |
It's too late for v0.8.0, I'm afraid! I already tagged/uploaded the release and am about to send out the announcement. |
No problem. I want to solve this anyways b/c it is quite awkward to keep converting back from |
To answer your original question: yes, separate |
Prototype is ready http://nbviewer.jupyter.org/gist/ocefpaf/cabdcb27a5ef7da1b6110327a5f03e17 I will polish this and send a PR soon. |
@shoyer the more I think about this the more I don't like the addition of extra keywords. Even though I would like this behavior to be the default one I really do not like the complexity I added here. Closing this... |
Don't convert data with time units to
timedeltas
by default. Most of the time this behavior is not desirable (e.g: wave period data).@shoyer suggest:
xref: #842 (comment)
The text was updated successfully, but these errors were encountered: