home / github / issue_comments

Menu
  • GraphQL API
  • Search all tables

issue_comments: 237414886

This data as json

html_url issue_url id node_id user created_at updated_at author_association body reactions performed_via_github_app issue
https://github.com/pydata/xarray/issues/843#issuecomment-237414886 https://api.github.com/repos/pydata/xarray/issues/843 237414886 MDEyOklzc3VlQ29tbWVudDIzNzQxNDg4Ng== 950575 2016-08-04T00:19:31Z 2016-08-04T00:19:31Z CONTRIBUTOR

@shoyer is this what you have in mid? Replacing decode_time for decode_datetimes and decode_timedelta and then:

``` python 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 timedelta and I would be inclined to remove decode_timedelta instead. However, that may be my very biased view since such transformation does not make sense with my data :smile:

Do you have any advice? (I would like to try this before you release v0.8.0)

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  153066635
Powered by Datasette · Queries took 0.806ms · About: xarray-datasette