home / github / issues

Menu
  • GraphQL API
  • Search all tables

issues: 567058587

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
567058587 MDU6SXNzdWU1NjcwNTg1ODc= 3778 Two strange errors in tests TestVariable using .copy() 490531 closed 0     7 2020-02-18T17:51:22Z 2020-02-28T15:16:14Z 2020-02-28T15:16:14Z CONTRIBUTOR      

Setup is as described in #3777.

The two failures are the following ones: ``` ____ TestVariable.test_index_0d_not_a_time _______

self = <xarray.tests.test_units.TestVariable object at 0x7f3926b2ad00>

def test_index_0d_not_a_time(self):
    d = np.datetime64("NaT", "ns")
    x = self.cls(["x"], [d])
  self._assertIndexedLikeNDArray(x, d)

xarray/tests/test_variable.py:206:


self = <xarray.tests.test_units.TestVariable object at 0x7f3926b2ad00> variable = <xarray.Variable (x: 1)> <Quantity(['NaT'], 'meter')> expected_value0 = numpy.datetime64('NaT'), expected_dtype = None

def _assertIndexedLikeNDArray(self, variable, expected_value0, expected_dtype=None):
    """Given a 1-dimensional variable, verify that the variable is indexed
    like a numpy.ndarray.
    """
    assert variable[0].shape == ()
    assert variable[0].ndim == 0
    assert variable[0].size == 1
    # test identity
  assert variable.equals(variable.copy())

E AssertionError: assert False E + where False = <bound method Variable.equals of \<xarray.Variable (x: 1)>\n\<Quantity(['NaT'], 'meter')>>(<xarray.Variable (x: 1)>\n<Quantity(['NaT'], 'meter')>) E + where <bound method Variable.equals of \<xarray.Variable (x: 1)>\n\<Quantity(['NaT'], 'meter')>> = <xarray.Variable (x: 1)>\n<Quantity(['NaT'], 'meter')>.equals E + and <xarray.Variable (x: 1)>\n<Quantity(['NaT'], 'meter')> = <bound method Variable.copy of \<xarray.Variable (x: 1)>\n\<Quantity(['NaT'], 'meter')>>() E + where <bound method Variable.copy of \<xarray.Variable (x: 1)>\n\<Quantity(['NaT'], 'meter')>> = <xarray.Variable (x: 1)>\n<Quantity(['NaT'], 'meter')>.copy

xarray/tests/test_variable.py:151: AssertionError ___ TestVariable.test_equals_all_dtypes ____

self = <xarray.tests.test_units.TestVariable object at 0x7f39282b4e50>

def test_equals_all_dtypes(self):
    for v, _ in self.example_1d_objects():
        v2 = v.copy()
      assert v.equals(v2)

E AssertionError: assert False E + where False = <bound method Variable.equals of \<xarray.Variable (x: 3)>\n\<Quantity(['2000-01-01T00:00:00.000000000' '2000-01-02T00:00:00.000000000'\n '2000-01-03T00:00:00.000000000'], 'meter')>>(<xarray.Variable (x: 3)>\n<Quantity(['2000-01-01T00:00:00.000000000' '2000-01-02T00:00:00.000000000'\n '2000-01-03T00:00:00.000000000'], 'meter')>) E + where <bound method Variable.equals of \<xarray.Variable (x: 3)>\n\<Quantity(['2000-01-01T00:00:00.000000000' '2000-01-02T00:00:00.000000000'\n '2000-01-03T00:00:00.000000000'], 'meter')>> = <xarray.Variable (x: 3)>\n<Quantity(['2000-01-01T00:00:00.000000000' '2000-01-02T00:00:00.000000000'\n '2000-01-03T00:00:00.000000000'], 'meter')>.equals

xarray/tests/test_variable.py:386: AssertionError ```

I have no idea what’s wrong here.

{
    "url": "https://api.github.com/repos/pydata/xarray/issues/3778/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
  • 7 rows from issue in issue_comments
Powered by Datasette · Queries took 0.588ms · About: xarray-datasette