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/pull/1261#issuecomment-284397545,https://api.github.com/repos/pydata/xarray/issues/1261,284397545,MDEyOklzc3VlQ29tbWVudDI4NDM5NzU0NQ==,5700886,2017-03-06T13:37:33Z,2017-03-06T13:37:33Z,CONTRIBUTOR,"Yes, I know that xarray usually doesn't use `datetime`. For climate data past 2262 with a standard calendar, however, the dtypes of the time axis are falling back to `datetime` / `netCDF4.datetime`. My last commit reflects what I'd consider ready to be pulled. Let me know what you think.","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,207011524 https://github.com/pydata/xarray/pull/1261#issuecomment-279467664,https://api.github.com/repos/pydata/xarray/issues/1261,279467664,MDEyOklzc3VlQ29tbWVudDI3OTQ2NzY2NA==,5700886,2017-02-13T17:50:13Z,2017-02-13T17:50:13Z,CONTRIBUTOR,"`netcdftime.datetime` vs. `datetime.datetime` is discussed in Unidata/netcdftime#8. For now, I only added `datetime.datetime` to the list of plottable other types (see https://github.com/willirath/xarray/blob/6f5e30f3a2f8ca907f0fd91bcd571e7d98027896/xarray/plot/plot.py#L52).","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,207011524 https://github.com/pydata/xarray/pull/1261#issuecomment-279459572,https://api.github.com/repos/pydata/xarray/issues/1261,279459572,MDEyOklzc3VlQ29tbWVudDI3OTQ1OTU3Mg==,5700886,2017-02-13T17:21:37Z,2017-02-13T17:26:12Z,CONTRIBUTOR,"a85b5c6 and e31aaab add a test plotting against a coordinate with `netCDF4.datetime` objects. 6f5e30f adds `datetime.datetime` objects to the list of plottable dtypes and splits the check into numpy dtypes (using numpy's type hierarchy) and all other types. ","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,207011524 https://github.com/pydata/xarray/pull/1261#issuecomment-279186528,https://api.github.com/repos/pydata/xarray/issues/1261,279186528,MDEyOklzc3VlQ29tbWVudDI3OTE4NjUyOA==,5700886,2017-02-12T00:26:59Z,2017-02-13T17:25:32Z,CONTRIBUTOR,"- [x] Add tests showing that netcdftime.datetime objects can be plotted (line and 2d plots). - [x] Rewrite `xarray.plot._ensure_plottable` to only let numeric and date-like types pass.","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,207011524 https://github.com/pydata/xarray/pull/1261#issuecomment-279340528,https://api.github.com/repos/pydata/xarray/issues/1261,279340528,MDEyOklzc3VlQ29tbWVudDI3OTM0MDUyOA==,5700886,2017-02-13T09:54:30Z,2017-02-13T09:54:30Z,CONTRIBUTOR,"> > Does matplotlib actually plot netcdftime datetimes correctly? > > Yes it does. They are just treated like `datetime.datetime` objects. I was wrong here: [`netCDF4.datetime` _is_ `datetime.datetime`](https://github.com/Unidata/netcdf4-python/blob/master/netCDF4/_netCDF4.pyx#L5084) while ([`netcdftime.datetime` is `DatetimeProlepticGregorian`](https://github.com/Unidata/netcdftime/blob/master/netcdftime/__init__.py#L3). And matplotlib fails on the latter: https://gist.github.com/willirath/48c04db0481e986fac0e44549e164ab0","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,207011524 https://github.com/pydata/xarray/pull/1261#issuecomment-279185373,https://api.github.com/repos/pydata/xarray/issues/1261,279185373,MDEyOklzc3VlQ29tbWVudDI3OTE4NTM3Mw==,5700886,2017-02-12T00:03:26Z,2017-02-12T00:03:26Z,CONTRIBUTOR,"> Does matplotlib actually plot netcdftime datetimes correctly? Yes it does. They are just treated like `datetime.datetime` objects.","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,207011524 https://github.com/pydata/xarray/pull/1261#issuecomment-279185264,https://api.github.com/repos/pydata/xarray/issues/1261,279185264,MDEyOklzc3VlQ29tbWVudDI3OTE4NTI2NA==,5700886,2017-02-12T00:01:21Z,2017-02-12T00:01:21Z,CONTRIBUTOR,"Failing tests: ``` xarray/tests/test_plot.py::TestPlot1D::test_nonnumeric_index_raises_typeerror FAILED xarray/tests/test_plot.py::TestContourf::test_nonnumeric_index_raises_typeerror FAILED xarray/tests/test_plot.py::TestContour::test_nonnumeric_index_raises_typeerror FAILED xarray/tests/test_plot.py::TestPcolormesh::test_nonnumeric_index_raises_typeerror FAILED xarray/tests/test_plot.py::TestImshow::test_nonnumeric_index_raises_typeerror FAIL ``` All of these check strings as input to the plot functions and expect a `TypeError`. `xarray.plot._right_dtype`, however, uses `numpy.issubdtype` to check, if the types of the given data are subtypes of the now included `netCDF4.datetime`, which is interpreted as `numpy.generic`. And as `numpy.generic` is the highest type in Numpy's type hierarchy, `xarray.plot._right_dtype` now always returns `True`. A possible way out would be to check for numeric types and datetime-like types separately.","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,207011524