home / github / issues

Menu
  • Search all tables
  • GraphQL API

issues: 287186057

This data as json

id node_id number title user state locked assignee milestone comments created_at updated_at closed_at author_association active_lock_reason draft pull_request body reactions performed_via_github_app state_reason repo type
287186057 MDU6SXNzdWUyODcxODYwNTc= 1813 Test Failure: test_datetime_line_plot 2443309 closed 0     3 2018-01-09T18:29:35Z 2018-01-10T07:13:53Z 2018-01-10T07:13:53Z MEMBER      

We're getting a single test failure in the plot tests on master (link to travis failure. I haven't been able to reproduce this locally yet so I'm just going to post here to see if anyone has any ideas.

Code Sample

```python ___ TestDatetimePlot.test_datetime_line_plot _____ self = <xarray.tests.test_plot.TestDatetimePlot testMethod=test_datetime_line_plot> def test_datetime_line_plot(self): # test if line plot raises no Exception

  self.darray.plot.line()

xarray/tests/test_plot.py:1333:


xarray/plot/plot.py:328: in line return line(self._da, args, *kwargs) xarray/plot/plot.py:223: in line _ensure_plottable(x)


args = (<xarray.DataArray 'time' (time: 12)> array([datetime.datetime(2017, 1, 1, 0, 0), datetime.datetime(2017, 2, 1,... 12, 1, 0, 0)], dtype=object) Coordinates: * time (time) object 2017-01-01 2017-02-01 2017-03-01 2017-04-01 ...,) numpy_types = [<class 'numpy.floating'>, <class 'numpy.integer'>, <class 'numpy.timedelta64'>, <class 'numpy.datetime64'>] other_types = [<class 'datetime.datetime'>] x = <xarray.DataArray 'time' (time: 12)> array([datetime.datetime(2017, 1, 1, 0, 0), datetime.datetime(2017, 2, 1, ...7, 12, 1, 0, 0)], dtype=object) Coordinates: * time (time) object 2017-01-01 2017-02-01 2017-03-01 2017-04-01 ... def _ensure_plottable(*args): """ Raise exception if there is anything in args that can't be plotted on an axis. """ numpy_types = [np.floating, np.integer, np.timedelta64, np.datetime64] other_types = [datetime]

    for x in args:
        if not (_valid_numpy_subdtype(np.array(x), numpy_types)
                or _valid_other_type(np.array(x), other_types)):
          raise TypeError('Plotting requires coordinates to be numeric '
                            'or dates.')

E TypeError: Plotting requires coordinates to be numeric or dates. xarray/plot/plot.py:57: TypeError ```

Expected Output

This test was previously passing

Output of xr.show_versions()

https://travis-ci.org/pydata/xarray/jobs/326640013#L1262

{
    "url": "https://api.github.com/repos/pydata/xarray/issues/1813/reactions",
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  completed 13221727 issue

Links from other tables

  • 0 rows from issues_id in issues_labels
  • 3 rows from issue in issue_comments
Powered by Datasette · Queries took 0.872ms · About: xarray-datasette