issue_comments: 433194914
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/2512#issuecomment-433194914 | https://api.github.com/repos/pydata/xarray/issues/2512 | 433194914 | MDEyOklzc3VlQ29tbWVudDQzMzE5NDkxNA== | 6628425 | 2018-10-25T20:30:49Z | 2018-10-25T20:30:49Z | MEMBER | I think this is a bug. The error message in particular makes things confusing. The problem stems from this line, which results in an array of dtype object (see the explanation below):
By default NumPy will cast a list of In [5]: dts
Out[5]:
array([datetime.datetime(1999, 1, 1, 0, 0),
datetime.datetime(1999, 1, 2, 0, 0),
datetime.datetime(1999, 1, 3, 0, 0),
datetime.datetime(1999, 1, 4, 0, 0),
datetime.datetime(1999, 1, 5, 0, 0),
datetime.datetime(1999, 1, 6, 0, 0),
datetime.datetime(1999, 1, 7, 0, 0),
datetime.datetime(1999, 1, 8, 0, 0),
datetime.datetime(1999, 1, 9, 0, 0),
datetime.datetime(1999, 1, 10, 0, 0)], dtype=object)
In [15]: da Out[15]: <xarray.DataArray (time: 10)> array([0, 1, 2, 3, 4, 5, 6, 7, 8, 9]) Coordinates: * time (time) object 1999-01-01 1999-01-02 1999-01-03 1999-01-04 ... In [16]: da.indexes['time']
Out[16]:
Index([1999-01-01 00:00:00, 1999-01-02 00:00:00, 1999-01-03 00:00:00,
1999-01-04 00:00:00, 1999-01-05 00:00:00, 1999-01-06 00:00:00,
1999-01-07 00:00:00, 1999-01-08 00:00:00, 1999-01-09 00:00:00,
1999-01-10 00:00:00],
dtype='object', name='time')
The error message actually results from the dates being converted to |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
374070147 |