home / github / issue_comments

Menu
  • Search all tables
  • GraphQL API

issue_comments: 395067197

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/2191#issuecomment-395067197 https://api.github.com/repos/pydata/xarray/issues/2191 395067197 MDEyOklzc3VlQ29tbWVudDM5NTA2NzE5Nw== 31460695 2018-06-06T13:25:11Z 2018-06-06T13:25:11Z NONE

Yes, when open_mfdataset decides to convert to CFTime this is much faster. When time is in datetime64, I get: ```


AttributeError Traceback (most recent call last) <ipython-input-72-a96fa0263d3e> in <module>() 9 dss = xr.open_mfdataset(files,decode_times=True,autoclose=True) 10 #month_start = [DatetimeNoLeap(date.dt.year, date.dt.month, 1) for date in dss.time] ---> 11 month_start = [DatetimeNoLeap(date.year, date.month, 1) for date in dss.time.values] 12 #month_start = [DatetimeNoLeap(yr, mon, 1) for yr,mon in zip(dss.time.dt.year,dss.time.dt.month)] 13 #break

<ipython-input-72-a96fa0263d3e> in <listcomp>(.0) 9 dss = xr.open_mfdataset(files,decode_times=True,autoclose=True) 10 #month_start = [DatetimeNoLeap(date.dt.year, date.dt.month, 1) for date in dss.time] ---> 11 month_start = [DatetimeNoLeap(date.year, date.month, 1) for date in dss.time.values] 12 #month_start = [DatetimeNoLeap(yr, mon, 1) for yr,mon in zip(dss.time.dt.year,dss.time.dt.month)] 13 #break

AttributeError: 'numpy.datetime64' object has no attribute 'year' ``` You can see I made a feeble attempt to fix it to work for all the CMIP5 calendars, but is just as slow. Any suggestions?

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