home / github / issue_comments

Menu
  • GraphQL API
  • Search all tables

issue_comments: 541046819

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/3283#issuecomment-541046819 https://api.github.com/repos/pydata/xarray/issues/3283 541046819 MDEyOklzc3VlQ29tbWVudDU0MTA0NjgxOQ== 12229877 2019-10-11T12:38:06Z 2019-10-11T12:38:06Z CONTRIBUTOR

The datetime64 & timedelta64 cases don't roundtrip completely, so there are test failures. I've added these in a separate commit at the end, so it's easy to cut that back out if you prefer.

The basic problem seems to be that Hypothesis is generating timedelta64[Y], but Xarray is dealing with timedelta64[ns]:

``` ____ test_netcdf_roundtrip _____ tmp_path = PosixPath('/tmp/pytest-of-vsts/pytest-0/test_netcdf_roundtrip0') data = data(...), arr = array([293], dtype='timedelta64[Y]') ... with xr.open_dataset(tmp_path / "test.nc") as roundtripped:

      xr.testing.assert_identical(original, roundtripped)

E AssertionError: Left and right Dataset objects are not identical E
E Differing data variables: E L data (0) timedelta64[ns] -106488 days +01:41:02.290448 E R data (0) timedelta64[ns] -106488 days +01:41:02.290449

properties/test_netcdf_roundtrip.py:51: AssertionError ---------------------------------- Hypothesis ---------------------------------- Falsifying example: test_netcdf_roundtrip( tmp_path=PosixPath('/tmp/pytest-of-vsts/pytest-0/test_netcdf_roundtrip0'), data=data(...), arr=array([293], dtype='timedelta64[Y]') ) ```

So either that's a pretty serious bug, or you should specify the max_period of the timedelta dtype strategy.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  490228661
Powered by Datasette · Queries took 0.992ms · About: xarray-datasette