home / github / issue_comments

Menu
  • GraphQL API
  • Search all tables

issue_comments: 388694419

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/2127#issuecomment-388694419 https://api.github.com/repos/pydata/xarray/issues/2127 388694419 MDEyOklzc3VlQ29tbWVudDM4ODY5NDQxOQ== 1217238 2018-05-14T04:32:43Z 2018-05-14T04:32:43Z MEMBER

Any multiple of 7 days (one week) seems to trigger it, e.g., ``` In [133]: np.array([datetime.timedelta(7)], dtype='timedelta64[D]')


TypeError Traceback (most recent call last) <ipython-input-133-92f07e97d8dc> in <module>() ----> 1 np.array([datetime.timedelta(7)], dtype='timedelta64[D]')

TypeError: Cannot cast datetime.timedelta object from metadata [Y] to [D] according to the rule 'same_kind' ```

For now, maybe try casting each element individually to np.timedelta64 as a work-around? e.g., In [139]: np.array([np.timedelta64(d, 'ns') for d in uniques.tolist()]) Out[139]: array([2419200000000000, 2592000000000000, 2678400000000000], dtype='timedelta64[ns]')

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