home / github / issues

Menu
  • Search all tables
  • GraphQL API

issues: 901856178

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
901856178 MDU6SXNzdWU5MDE4NTYxNzg= 5375 Tests TestDataset.test_resample_loffset and test_interpolate_1d[1-x-linear] fail on i586 198999 closed 0     5 2021-05-26T06:56:09Z 2021-05-26T13:46:34Z 2021-05-26T07:03:23Z NONE      

What happened: When running the test suite while packaging the package for openSUSE I’ve got these failed tests on i586: [ 107s] ______________________ TestDataset.test_resample_loffset _______________________ [ 107s] [gw4] linux -- Python 3.9.5 /usr/bin/python3.9 [ 107s] [ 107s] self = <xarray.tests.test_dataset.TestDataset object at 0xf01f3ec8> [ 107s] [ 107s] def test_resample_loffset(self): [ 107s] times = pd.date_range("2000-01-01", freq="6H", periods=10) [ 107s] ds = Dataset( [ 107s] { [ 107s] "foo": (["time", "x", "y"], np.random.randn(10, 5, 3)), [ 107s] "bar": ("time", np.random.randn(10), {"meta": "data"}), [ 107s] "time": times, [ 107s] } [ 107s] ) [ 107s] ds.attrs["dsmeta"] = "dsdata" [ 107s] [ 107s] # Our use of `loffset` may change if we align our API with pandas' changes. [ 107s] # ref https://github.com/pydata/xarray/pull/4537 [ 107s] actual = ds.resample(time="24H", loffset="-12H").mean().bar [ 107s] expected_ = ds.bar.to_series().resample("24H").mean() [ 107s] expected_.index += to_offset("-12H") [ 107s] expected = DataArray.from_series(expected_) [ 107s] > assert_identical(actual, expected) [ 107s] E AssertionError: Left and right DataArray objects are not identical [ 107s] E [ 107s] E Differing values: [ 107s] E L [ 107s] E array([ 0.018477, -0.178807, -0.792644]) [ 107s] E R [ 107s] E array([ 0.018477, -0.178807, -0.792644]) [ 107s] [ 107s] /home/abuild/rpmbuild/BUILD/xarray-0.18.2/xarray/tests/test_dataset.py:3991: AssertionError [ 107s] _______________________ test_interpolate_1d[1-x-linear] ________________________ [ 107s] [gw2] linux -- Python 3.9.5 /usr/bin/python3.9 [ 107s] [ 107s] method = 'linear', dim = 'x', case = 1 [ 107s] [ 107s] @pytest.mark.parametrize("method", ["linear", "cubic"]) [ 107s] @pytest.mark.parametrize("dim", ["x", "y"]) [ 107s] @pytest.mark.parametrize("case", [0, 1]) [ 107s] def test_interpolate_1d(method, dim, case): [ 107s] if not has_scipy: [ 107s] pytest.skip("scipy is not installed.") [ 107s] [ 107s] if not has_dask and case in [1]: [ 107s] pytest.skip("dask is not installed in the environment.") [ 107s] [ 107s] da = get_example_data(case) [ 107s] xdest = np.linspace(0.0, 0.9, 80) [ 107s] actual = da.interp(method=method, **{dim: xdest}) [ 107s] [ 107s] # scipy interpolation for the reference [ 107s] def func(obj, new_x): [ 107s] return scipy.interpolate.interp1d( [ 107s] da[dim], [ 107s] obj.data, [ 107s] axis=obj.get_axis_num(dim), [ 107s] bounds_error=False, [ 107s] fill_value=np.nan, [ 107s] kind=method, [ 107s] )(new_x) [ 107s] [ 107s] if dim == "x": [ 107s] > coords = {"x": xdest, "y": da["y"], "x2": ("x", func(da["x2"], xdest))} [ 107s] [ 107s] /home/abuild/rpmbuild/BUILD/xarray-0.18.2/xarray/tests/test_interp.py:89: [ 107s] _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ [ 107s] [ 107s] obj = <xarray.DataArray 'x2' (x: 100)> [ 107s] dask.array<xarray-x2, shape=(100,), dtype=float64, chunksize=(100,), chunktype=numpy.....0101 0.0202 0.0303 ... 0.9697 0.9798 0.9899 1.0 [ 107s] x2 (x) float64 dask.array<chunksize=(100,), meta=np.ndarray> [ 107s] new_x = array([0. , 0.01139241, 0.02278481, 0.03417722, 0.04556962, [ 107s] 0.05696203, 0.06835443, 0.07974684, 0.091139...35, 0.80886076, 0.82025316, 0.83164557, 0.84303797, [ 107s] 0.85443038, 0.86582278, 0.87721519, 0.88860759, 0.9 ]) [ 107s] [ 107s] def func(obj, new_x): [ 107s] > return scipy.interpolate.interp1d( [ 107s] da[dim], [ 107s] obj.data, [ 107s] axis=obj.get_axis_num(dim), [ 107s] bounds_error=False, [ 107s] fill_value=np.nan, [ 107s] kind=method, [ 107s] )(new_x) [ 107s] E AttributeError: module 'scipy' has no attribute 'interpolate' [ 107s] [ 107s] /home/abuild/rpmbuild/BUILD/xarray-0.18.2/xarray/tests/test_interp.py:79: AttributeError This is the build log showing all used packages and steps leading to the failures.

Anything else we need to know?: The first failure is easily fixed by scipy-interpolate.patch

Environment: see the above linked log

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