home / github / issue_comments

Menu
  • Search all tables
  • GraphQL API

issue_comments: 279185264

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/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
Powered by Datasette · Queries took 0.691ms · About: xarray-datasette