Skip to content

Add support for Array API in NamedArray #2974

Add support for Array API in NamedArray

Add support for Array API in NamedArray #2974

GitHub Actions / Test Results failed Sep 25, 2024 in 0s

1 errors, 2 867 fail, 1 628 skipped, 15 760 pass in 1h 27m 23s

     10 files  +     10       10 suites  +10   1h 27m 23s ⏱️ + 1h 27m 23s
 20 256 tests + 20 256   15 760 ✅ + 15 760   1 628 💤 + 1 628   2 867 ❌ + 2 867   1 🔥 + 1 
158 047 runs  +158 047  125 227 ✅ +125 227  19 904 💤 +19 904  12 904 ❌ +12 904  12 🔥 +12 

Results for commit f6ffdaf. ± Comparison against earlier commit 889feaa.

Annotations

Check failure on line 0 in /

See this annotation in the file changed.

@github-actions github-actions / Test Results

3 out of 4 runs with error: xarray.tests.test_sparse

artifacts/Test results for Linux-3.10 min-all-deps/pytest.xml [took 0s]
artifacts/Test results for Windows-3.10/pytest.xml [took 0s]
artifacts/Test results for Windows-3.12/pytest.xml [took 0s]
Raw output
collection failure
collection failure
collection failure
collection failure
#x1B[1m#x1B[31mxarray\tests\test_sparse.py#x1B[0m:70: in __repr__
    return f"obj.{self.meth}(*{self.args}, **{self.kwargs})"
#x1B[1m#x1B[31mxarray\core\common.py#x1B[0m:183: in __repr__
    return formatting.array_repr(self)
#x1B[1m#x1B[31mC:\Users\runneradmin\micromamba\envs\xarray-tests\lib\reprlib.py#x1B[0m:21: in wrapper
    result = user_function(self)
#x1B[1m#x1B[31mxarray\core\formatting.py#x1B[0m:698: in array_repr
    nbytes_str = render_human_readable_nbytes(arr.nbytes)
#x1B[1m#x1B[31mxarray\namedarray\core.py#x1B[0m:925: in nbytes
    from xarray.namedarray._array_api._utils import _get_data_namespace
#x1B[1m#x1B[31mxarray\namedarray\_array_api\__init__.py#x1B[0m:71: in <module>
    from xarray.namedarray._array_api._dtypes import (
#x1B[1m#x1B[31mxarray\namedarray\_array_api\_dtypes.py#x1B[0m:18: in <module>
    bool = _xp.bool
#x1B[1m#x1B[31mC:\Users\runneradmin\micromamba\envs\xarray-tests\lib\site-packages\numpy\__init__.py#x1B[0m:319: in __getattr__
    warnings.warn(
#x1B[1m#x1B[31mE   FutureWarning: In the future `np.bool` will be defined as the corresponding NumPy scalar.#x1B[0m

#x1B[33mThe above exception was the direct cause of the following exception:#x1B[0m
#x1B[1m#x1B[31mC:\Users\runneradmin\micromamba\envs\xarray-tests\lib\site-packages\pluggy\_hooks.py#x1B[0m:513: in __call__
    return self._hookexec(self.name, self._hookimpls.copy(), kwargs, firstresult)
#x1B[1m#x1B[31mC:\Users\runneradmin\micromamba\envs\xarray-tests\lib\site-packages\pluggy\_manager.py#x1B[0m:120: in _hookexec
    return self._inner_hookexec(hook_name, methods, kwargs, firstresult)
#x1B[1m#x1B[31mC:\Users\runneradmin\micromamba\envs\xarray-tests\lib\site-packages\_pytest\python.py#x1B[0m:245: in pytest_pycollect_makeitem
    return list(collector._genfunctions(name, obj))
#x1B[1m#x1B[31mC:\Users\runneradmin\micromamba\envs\xarray-tests\lib\site-packages\_pytest\python.py#x1B[0m:462: in _genfunctions
    self.ihook.pytest_generate_tests.call_extra(methods, dict(metafunc=metafunc))
#x1B[1m#x1B[31mC:\Users\runneradmin\micromamba\envs\xarray-tests\lib\site-packages\pluggy\_hooks.py#x1B[0m:574: in call_extra
    return self._hookexec(self.name, hookimpls, kwargs, firstresult)
#x1B[1m#x1B[31mC:\Users\runneradmin\micromamba\envs\xarray-tests\lib\site-packages\pluggy\_manager.py#x1B[0m:120: in _hookexec
    return self._inner_hookexec(hook_name, methods, kwargs, firstresult)
#x1B[1m#x1B[31mC:\Users\runneradmin\micromamba\envs\xarray-tests\lib\site-packages\_pytest\python.py#x1B[0m:115: in pytest_generate_tests
    metafunc.parametrize(*marker.args, **marker.kwargs, _param_mark=marker)
#x1B[1m#x1B[31mC:\Users\runneradmin\micromamba\envs\xarray-tests\lib\site-packages\_pytest\python.py#x1B[0m:1236: in parametrize
    ids = self._resolve_parameter_set_ids(
#x1B[1m#x1B[31mC:\Users\runneradmin\micromamba\envs\xarray-tests\lib\site-packages\_pytest\python.py#x1B[0m:1355: in _resolve_parameter_set_ids
    return id_maker.make_unique_parameterset_ids()
#x1B[1m#x1B[31mC:\Users\runneradmin\micromamba\envs\xarray-tests\lib\site-packages\_pytest\python.py#x1B[0m:897: in make_unique_parameterset_ids
    resolved_ids = list(self._resolve_ids())
#x1B[1m#x1B[31mC:\Users\runneradmin\micromamba\envs\xarray-tests\lib\site-packages\_pytest\python.py#x1B[0m:932: in _resolve_ids
    yield "-".join(
#x1B[1m#x1B[31mC:\Users\runneradmin\micromamba\envs\xarray-tests\lib\site-packages\_pytest\python.py#x1B[0m:933: in <genexpr>
    self._idval(val, argname, idx)
#x1B[1m#x1B[31mC:\Users\runneradmin\micromamba\envs\xarray-tests\lib\site-packages\_pytest\python.py#x1B[0m:939: in _idval
    idval = self._idval_from_function(val, argname, idx)
#x1B[1m#x1B[31mC:\Users\runneradmin\micromamba\envs\xarray-tests\lib\site-packages\_pytest\python.py#x1B[0m:961: in _idval_from_function
    raise ValueError(msg) from e
#x1B[1m#x1B[31mE   ValueError: xarray/tests/test_sparse.py::test_variable_method: error raised while trying to determine id of parameter 'func' at position 22#x1B[0m
#x1B[1m#x1B[31mxarray\tests\test_sparse.py#x1B[0m:70: in __repr__
    return f"obj.{self.meth}(*{self.args}, **{self.kwargs})"
#x1B[1m#x1B[31mxarray\core\common.py#x1B[0m:183: in __repr__
    return formatting.array_repr(self)
#x1B[1m#x1B[31mC:\Users\runneradmin\micromamba\envs\xarray-tests\lib\reprlib.py#x1B[0m:21: in wrapper
    result = user_function(self)
#x1B[1m#x1B[31mxarray\core\formatting.py#x1B[0m:698: in array_repr
    nbytes_str = render_human_readable_nbytes(arr.nbytes)
#x1B[1m#x1B[31mxarray\namedarray\core.py#x1B[0m:925: in nbytes
    from xarray.namedarray._array_api._utils import _get_data_namespace
#x1B[1m#x1B[31mxarray\namedarray\_array_api\__init__.py#x1B[0m:71: in <module>
    from xarray.namedarray._array_api._dtypes import (
#x1B[1m#x1B[31mxarray\namedarray\_array_api\_dtypes.py#x1B[0m:18: in <module>
    bool = _xp.bool
#x1B[1m#x1B[31mC:\Users\runneradmin\micromamba\envs\xarray-tests\lib\site-packages\numpy\__init__.py#x1B[0m:319: in __getattr__
    warnings.warn(
#x1B[1m#x1B[31mE   FutureWarning: In the future `np.bool` will be defined as the corresponding NumPy scalar.#x1B[0m

#x1B[33mThe above exception was the direct cause of the following exception:#x1B[0m
#x1B[1m#x1B[31mC:\Users\runneradmin\micromamba\envs\xarray-tests\lib\site-packages\pluggy\_hooks.py#x1B[0m:513: in __call__
    return self._hookexec(self.name, self._hookimpls.copy(), kwargs, firstresult)
#x1B[1m#x1B[31mC:\Users\runneradmin\micromamba\envs\xarray-tests\lib\site-packages\pluggy\_manager.py#x1B[0m:120: in _hookexec
    return self._inner_hookexec(hook_name, methods, kwargs, firstresult)
#x1B[1m#x1B[31mC:\Users\runneradmin\micromamba\envs\xarray-tests\lib\site-packages\_pytest\python.py#x1B[0m:245: in pytest_pycollect_makeitem
    return list(collector._genfunctions(name, obj))
#x1B[1m#x1B[31mC:\Users\runneradmin\micromamba\envs\xarray-tests\lib\site-packages\_pytest\python.py#x1B[0m:462: in _genfunctions
    self.ihook.pytest_generate_tests.call_extra(methods, dict(metafunc=metafunc))
#x1B[1m#x1B[31mC:\Users\runneradmin\micromamba\envs\xarray-tests\lib\site-packages\pluggy\_hooks.py#x1B[0m:574: in call_extra
    return self._hookexec(self.name, hookimpls, kwargs, firstresult)
#x1B[1m#x1B[31mC:\Users\runneradmin\micromamba\envs\xarray-tests\lib\site-packages\pluggy\_manager.py#x1B[0m:120: in _hookexec
    return self._inner_hookexec(hook_name, methods, kwargs, firstresult)
#x1B[1m#x1B[31mC:\Users\runneradmin\micromamba\envs\xarray-tests\lib\site-packages\_pytest\python.py#x1B[0m:115: in pytest_generate_tests
    metafunc.parametrize(*marker.args, **marker.kwargs, _param_mark=marker)
#x1B[1m#x1B[31mC:\Users\runneradmin\micromamba\envs\xarray-tests\lib\site-packages\_pytest\python.py#x1B[0m:1236: in parametrize
    ids = self._resolve_parameter_set_ids(
#x1B[1m#x1B[31mC:\Users\runneradmin\micromamba\envs\xarray-tests\lib\site-packages\_pytest\python.py#x1B[0m:1355: in _resolve_parameter_set_ids
    return id_maker.make_unique_parameterset_ids()
#x1B[1m#x1B[31mC:\Users\runneradmin\micromamba\envs\xarray-tests\lib\site-packages\_pytest\python.py#x1B[0m:897: in make_unique_parameterset_ids
    resolved_ids = list(self._resolve_ids())
#x1B[1m#x1B[31mC:\Users\runneradmin\micromamba\envs\xarray-tests\lib\site-packages\_pytest\python.py#x1B[0m:932: in _resolve_ids
    yield "-".join(
#x1B[1m#x1B[31mC:\Users\runneradmin\micromamba\envs\xarray-tests\lib\site-packages\_pytest\python.py#x1B[0m:933: in <genexpr>
    self._idval(val, argname, idx)
#x1B[1m#x1B[31mC:\Users\runneradmin\micromamba\envs\xarray-tests\lib\site-packages\_pytest\python.py#x1B[0m:939: in _idval
    idval = self._idval_from_function(val, argname, idx)
#x1B[1m#x1B[31mC:\Users\runneradmin\micromamba\envs\xarray-tests\lib\site-packages\_pytest\python.py#x1B[0m:961: in _idval_from_function
    raise ValueError(msg) from e
#x1B[1m#x1B[31mE   ValueError: xarray/tests/test_sparse.py::test_variable_method: error raised while trying to determine id of parameter 'func' at position 22#x1B[0m
#x1B[1m#x1B[31mxarray\tests\test_sparse.py#x1B[0m:70: in __repr__
    return f"obj.{self.meth}(*{self.args}, **{self.kwargs})"
#x1B[1m#x1B[31mxarray\core\common.py#x1B[0m:183: in __repr__
    return formatting.array_repr(self)
#x1B[1m#x1B[31mC:\Users\runneradmin\micromamba\envs\xarray-tests\lib\reprlib.py#x1B[0m:21: in wrapper
    result = user_function(self)
#x1B[1m#x1B[31mxarray\core\formatting.py#x1B[0m:698: in array_repr
    nbytes_str = render_human_readable_nbytes(arr.nbytes)
#x1B[1m#x1B[31mxarray\namedarray\core.py#x1B[0m:925: in nbytes
    from xarray.namedarray._array_api._utils import _get_data_namespace
#x1B[1m#x1B[31mxarray\namedarray\_array_api\__init__.py#x1B[0m:71: in <module>
    from xarray.namedarray._array_api._dtypes import (
#x1B[1m#x1B[31mxarray\namedarray\_array_api\_dtypes.py#x1B[0m:18: in <module>
    bool = _xp.bool
#x1B[1m#x1B[31mC:\Users\runneradmin\micromamba\envs\xarray-tests\lib\site-packages\numpy\__init__.py#x1B[0m:319: in __getattr__
    warnings.warn(
#x1B[1m#x1B[31mE   FutureWarning: In the future `np.bool` will be defined as the corresponding NumPy scalar.#x1B[0m

#x1B[33mThe above exception was the direct cause of the following exception:#x1B[0m
#x1B[1m#x1B[31mC:\Users\runneradmin\micromamba\envs\xarray-tests\lib\site-packages\pluggy\_hooks.py#x1B[0m:513: in __call__
    return self._hookexec(self.name, self._hookimpls.copy(), kwargs, firstresult)
#x1B[1m#x1B[31mC:\Users\runneradmin\micromamba\envs\xarray-tests\lib\site-packages\pluggy\_manager.py#x1B[0m:120: in _hookexec
    return self._inner_hookexec(hook_name, methods, kwargs, firstresult)
#x1B[1m#x1B[31mC:\Users\runneradmin\micromamba\envs\xarray-tests\lib\site-packages\_pytest\python.py#x1B[0m:245: in pytest_pycollect_makeitem
    return list(collector._genfunctions(name, obj))
#x1B[1m#x1B[31mC:\Users\runneradmin\micromamba\envs\xarray-tests\lib\site-packages\_pytest\python.py#x1B[0m:462: in _genfunctions
    self.ihook.pytest_generate_tests.call_extra(methods, dict(metafunc=metafunc))
#x1B[1m#x1B[31mC:\Users\runneradmin\micromamba\envs\xarray-tests\lib\site-packages\pluggy\_hooks.py#x1B[0m:574: in call_extra
    return self._hookexec(self.name, hookimpls, kwargs, firstresult)
#x1B[1m#x1B[31mC:\Users\runneradmin\micromamba\envs\xarray-tests\lib\site-packages\pluggy\_manager.py#x1B[0m:120: in _hookexec
    return self._inner_hookexec(hook_name, methods, kwargs, firstresult)
#x1B[1m#x1B[31mC:\Users\runneradmin\micromamba\envs\xarray-tests\lib\site-packages\_pytest\python.py#x1B[0m:115: in pytest_generate_tests
    metafunc.parametrize(*marker.args, **marker.kwargs, _param_mark=marker)
#x1B[1m#x1B[31mC:\Users\runneradmin\micromamba\envs\xarray-tests\lib\site-packages\_pytest\python.py#x1B[0m:1236: in parametrize
    ids = self._resolve_parameter_set_ids(
#x1B[1m#x1B[31mC:\Users\runneradmin\micromamba\envs\xarray-tests\lib\site-packages\_pytest\python.py#x1B[0m:1355: in _resolve_parameter_set_ids
    return id_maker.make_unique_parameterset_ids()
#x1B[1m#x1B[31mC:\Users\runneradmin\micromamba\envs\xarray-tests\lib\site-packages\_pytest\python.py#x1B[0m:897: in make_unique_parameterset_ids
    resolved_ids = list(self._resolve_ids())
#x1B[1m#x1B[31mC:\Users\runneradmin\micromamba\envs\xarray-tests\lib\site-packages\_pytest\python.py#x1B[0m:932: in _resolve_ids
    yield "-".join(
#x1B[1m#x1B[31mC:\Users\runneradmin\micromamba\envs\xarray-tests\lib\site-packages\_pytest\python.py#x1B[0m:933: in <genexpr>
    self._idval(val, argname, idx)
#x1B[1m#x1B[31mC:\Users\runneradmin\micromamba\envs\xarray-tests\lib\site-packages\_pytest\python.py#x1B[0m:939: in _idval
    idval = self._idval_from_function(val, argname, idx)
#x1B[1m#x1B[31mC:\Users\runneradmin\micromamba\envs\xarray-tests\lib\site-packages\_pytest\python.py#x1B[0m:961: in _idval_from_function
    raise ValueError(msg) from e
#x1B[1m#x1B[31mE   ValueError: xarray/tests/test_sparse.py::test_variable_method: error raised while trying to determine id of parameter 'func' at position 22#x1B[0m
#x1B[1m#x1B[31mxarray\tests\test_sparse.py#x1B[0m:70: in __repr__
    return f"obj.{self.meth}(*{self.args}, **{self.kwargs})"
#x1B[1m#x1B[31mxarray\core\common.py#x1B[0m:183: in __repr__
    return formatting.array_repr(self)
#x1B[1m#x1B[31mC:\Users\runneradmin\micromamba\envs\xarray-tests\lib\reprlib.py#x1B[0m:21: in wrapper
    result = user_function(self)
#x1B[1m#x1B[31mxarray\core\formatting.py#x1B[0m:698: in array_repr
    nbytes_str = render_human_readable_nbytes(arr.nbytes)
#x1B[1m#x1B[31mxarray\namedarray\core.py#x1B[0m:925: in nbytes
    from xarray.namedarray._array_api._utils import _get_data_namespace
#x1B[1m#x1B[31mxarray\namedarray\_array_api\__init__.py#x1B[0m:71: in <module>
    from xarray.namedarray._array_api._dtypes import (
#x1B[1m#x1B[31mxarray\namedarray\_array_api\_dtypes.py#x1B[0m:18: in <module>
    bool = _xp.bool
#x1B[1m#x1B[31mC:\Users\runneradmin\micromamba\envs\xarray-tests\lib\site-packages\numpy\__init__.py#x1B[0m:319: in __getattr__
    warnings.warn(
#x1B[1m#x1B[31mE   FutureWarning: In the future `np.bool` will be defined as the corresponding NumPy scalar.#x1B[0m

#x1B[33mThe above exception was the direct cause of the following exception:#x1B[0m
#x1B[1m#x1B[31mC:\Users\runneradmin\micromamba\envs\xarray-tests\lib\site-packages\pluggy\_hooks.py#x1B[0m:513: in __call__
    return self._hookexec(self.name, self._hookimpls.copy(), kwargs, firstresult)
#x1B[1m#x1B[31mC:\Users\runneradmin\micromamba\envs\xarray-tests\lib\site-packages\pluggy\_manager.py#x1B[0m:120: in _hookexec
    return self._inner_hookexec(hook_name, methods, kwargs, firstresult)
#x1B[1m#x1B[31mC:\Users\runneradmin\micromamba\envs\xarray-tests\lib\site-packages\_pytest\python.py#x1B[0m:245: in pytest_pycollect_makeitem
    return list(collector._genfunctions(name, obj))
#x1B[1m#x1B[31mC:\Users\runneradmin\micromamba\envs\xarray-tests\lib\site-packages\_pytest\python.py#x1B[0m:462: in _genfunctions
    self.ihook.pytest_generate_tests.call_extra(methods, dict(metafunc=metafunc))
#x1B[1m#x1B[31mC:\Users\runneradmin\micromamba\envs\xarray-tests\lib\site-packages\pluggy\_hooks.py#x1B[0m:574: in call_extra
    return self._hookexec(self.name, hookimpls, kwargs, firstresult)
#x1B[1m#x1B[31mC:\Users\runneradmin\micromamba\envs\xarray-tests\lib\site-packages\pluggy\_manager.py#x1B[0m:120: in _hookexec
    return self._inner_hookexec(hook_name, methods, kwargs, firstresult)
#x1B[1m#x1B[31mC:\Users\runneradmin\micromamba\envs\xarray-tests\lib\site-packages\_pytest\python.py#x1B[0m:115: in pytest_generate_tests
    metafunc.parametrize(*marker.args, **marker.kwargs, _param_mark=marker)
#x1B[1m#x1B[31mC:\Users\runneradmin\micromamba\envs\xarray-tests\lib\site-packages\_pytest\python.py#x1B[0m:1236: in parametrize
    ids = self._resolve_parameter_set_ids(
#x1B[1m#x1B[31mC:\Users\runneradmin\micromamba\envs\xarray-tests\lib\site-packages\_pytest\python.py#x1B[0m:1355: in _resolve_parameter_set_ids
    return id_maker.make_unique_parameterset_ids()
#x1B[1m#x1B[31mC:\Users\runneradmin\micromamba\envs\xarray-tests\lib\site-packages\_pytest\python.py#x1B[0m:897: in make_unique_parameterset_ids
    resolved_ids = list(self._resolve_ids())
#x1B[1m#x1B[31mC:\Users\runneradmin\micromamba\envs\xarray-tests\lib\site-packages\_pytest\python.py#x1B[0m:932: in _resolve_ids
    yield "-".join(
#x1B[1m#x1B[31mC:\Users\runneradmin\micromamba\envs\xarray-tests\lib\site-packages\_pytest\python.py#x1B[0m:933: in <genexpr>
    self._idval(val, argname, idx)
#x1B[1m#x1B[31mC:\Users\runneradmin\micromamba\envs\xarray-tests\lib\site-packages\_pytest\python.py#x1B[0m:939: in _idval
    idval = self._idval_from_function(val, argname, idx)
#x1B[1m#x1B[31mC:\Users\runneradmin\micromamba\envs\xarray-tests\lib\site-packages\_pytest\python.py#x1B[0m:961: in _idval_from_function
    raise ValueError(msg) from e
#x1B[1m#x1B[31mE   ValueError: xarray/tests/test_sparse.py::test_variable_method: error raised while trying to determine id of parameter 'func' at position 22#x1B[0m

Check warning on line 0 in xarray.tests.test_assertions

See this annotation in the file changed.

@github-actions github-actions / Test Results

1 out of 9 runs failed: test_assert_allclose[Dataset] (xarray.tests.test_assertions)

artifacts/Test results for Linux-3.10 bare-minimum/pytest.xml [took 0s]
Raw output
AttributeError: module 'numpy' has no attribute 'bool'.
`np.bool` was a deprecated alias for the builtin `bool`. To avoid this error in existing code, use `bool` by itself. Doing this will not modify any behavior and is safe. If you specifically wanted the numpy scalar type, use `np.bool_` here.
The aliases was originally deprecated in NumPy 1.20; for more details and guidance see the original release note at:
    https://numpy.org/devdocs/release/1.20.0-notes.html#deprecations. Did you mean: 'bool_'?
obj1 = <xarray.Dataset> Size: 32B
Dimensions:  (x: 2, y: 2)
Dimensions without coordinates: x, y
Data variables:
    a        (x) float64 16B 1e-17 2.0
    b        (y) float64 16B -2e-18 2.0
obj2 = <xarray.Dataset> Size: 32B
Dimensions:  (x: 2, y: 2)
Dimensions without coordinates: x, y
Data variables:
    a        (x) int64 16B 0 2
    b        (y) int64 16B 0 1

    @pytest.mark.parametrize(
        "obj1,obj2",
        (
            pytest.param(
                xr.Variable("x", [1e-17, 2]), xr.Variable("x", [0, 3]), id="Variable"
            ),
            pytest.param(
                xr.DataArray([1e-17, 2], dims="x"),
                xr.DataArray([0, 3], dims="x"),
                id="DataArray",
            ),
            pytest.param(
                xr.Dataset({"a": ("x", [1e-17, 2]), "b": ("y", [-2e-18, 2])}),
                xr.Dataset({"a": ("x", [0, 2]), "b": ("y", [0, 1])}),
                id="Dataset",
            ),
            pytest.param(
                xr.DataArray(np.array("a", dtype="|S1")),
                xr.DataArray(np.array("b", dtype="|S1")),
                id="DataArray_with_character_dtype",
            ),
        ),
    )
    def test_assert_allclose(obj1, obj2) -> None:
        with pytest.raises(AssertionError):
>           xr.testing.assert_allclose(obj1, obj2)

#x1B[1m#x1B[31m/home/runner/work/xarray/xarray/xarray/tests/test_assertions.py#x1B[0m:64: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
#x1B[1m#x1B[31m/home/runner/work/xarray/xarray/xarray/core/formatting.py#x1B[0m:1025: in diff_dataset_repr
    diff_data_vars_repr(a.data_vars, b.data_vars, compat, col_width=col_width)
#x1B[1m#x1B[31m/home/runner/work/xarray/xarray/xarray/core/formatting.py#x1B[0m:858: in _diff_mapping_repr
    summarizer(k, a_mapping[k], col_width, **a_summarizer_kwargs[k]),
#x1B[1m#x1B[31m/home/runner/work/xarray/xarray/xarray/core/formatting.py#x1B[0m:345: in summarize_variable
    nbytes_str = f" {render_human_readable_nbytes(variable.nbytes)}"
#x1B[1m#x1B[31m/home/runner/work/xarray/xarray/xarray/namedarray/core.py#x1B[0m:925: in nbytes
    from xarray.namedarray._array_api._utils import _get_data_namespace
#x1B[1m#x1B[31m/home/runner/work/xarray/xarray/xarray/namedarray/_array_api/__init__.py#x1B[0m:71: in <module>
    from xarray.namedarray._array_api._dtypes import (
#x1B[1m#x1B[31m/home/runner/work/xarray/xarray/xarray/namedarray/_array_api/_dtypes.py#x1B[0m:18: in <module>
    bool = _xp.bool
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

attr = 'bool'

    def __getattr__(attr):
        # Warn for expired attributes, and return a dummy function
        # that always raises an exception.
        import warnings
        try:
            msg = __expired_functions__[attr]
        except KeyError:
            pass
        else:
            warnings.warn(msg, DeprecationWarning, stacklevel=2)
    
            def _expired(*args, **kwds):
                raise RuntimeError(msg)
    
            return _expired
    
        # Emit warnings for deprecated attributes
        try:
            val, msg = __deprecated_attrs__[attr]
        except KeyError:
            pass
        else:
            warnings.warn(msg, DeprecationWarning, stacklevel=2)
            return val
    
        if attr in __future_scalars__:
            # And future warnings for those that will change, but also give
            # the AttributeError
            warnings.warn(
                f"In the future `np.{attr}` will be defined as the "
                "corresponding NumPy scalar.", FutureWarning, stacklevel=2)
    
        if attr in __former_attrs__:
>           raise AttributeError(__former_attrs__[attr])
#x1B[1m#x1B[31mE           AttributeError: module 'numpy' has no attribute 'bool'.#x1B[0m
#x1B[1m#x1B[31mE           `np.bool` was a deprecated alias for the builtin `bool`. To avoid this error in existing code, use `bool` by itself. Doing this will not modify any behavior and is safe. If you specifically wanted the numpy scalar type, use `np.bool_` here.#x1B[0m
#x1B[1m#x1B[31mE           The aliases was originally deprecated in NumPy 1.20; for more details and guidance see the original release note at:#x1B[0m
#x1B[1m#x1B[31mE               https://numpy.org/devdocs/release/1.20.0-notes.html#deprecations. Did you mean: 'bool_'?#x1B[0m

#x1B[1m#x1B[31m/home/runner/micromamba/envs/xarray-tests/lib/python3.10/site-packages/numpy/__init__.py#x1B[0m:305: AttributeError

Check warning on line 0 in xarray.tests.test_assertions

See this annotation in the file changed.

@github-actions github-actions / Test Results

4 out of 9 runs failed: test_ensure_warnings_not_elevated[assert_duckarray_equal] (xarray.tests.test_assertions)

artifacts/Test results for Linux-3.10 bare-minimum/pytest.xml [took 0s]
artifacts/Test results for Linux-3.10 min-all-deps/pytest.xml [took 0s]
artifacts/Test results for Windows-3.10/pytest.xml [took 0s]
artifacts/Test results for Windows-3.12/pytest.xml [took 0s]
Raw output
AttributeError: module 'numpy' has no attribute 'bool'.
`np.bool` was a deprecated alias for the builtin `bool`. To avoid this error in existing code, use `bool` by itself. Doing this will not modify any behavior and is safe. If you specifically wanted the numpy scalar type, use `np.bool_` here.
The aliases was originally deprecated in NumPy 1.20; for more details and guidance see the original release note at:
    https://numpy.org/devdocs/release/1.20.0-notes.html#deprecations. Did you mean: 'bool_'?
func = 'assert_duckarray_equal'

    @pytest.mark.parametrize(
        "func",
        [
            "assert_equal",
            "assert_identical",
            "assert_allclose",
            "assert_duckarray_equal",
            "assert_duckarray_allclose",
        ],
    )
    def test_ensure_warnings_not_elevated(func) -> None:
        # make sure warnings are not elevated to errors in the assertion functions
        # e.g. by @pytest.mark.filterwarnings("error")
        # see https://github.com/pydata/xarray/pull/4760#issuecomment-774101639
    
        # define a custom Variable class that raises a warning in assert_*
        class WarningVariable(xr.Variable):
            @property  # type: ignore[misc]
            def dims(self):
                warnings.warn("warning in test", stacklevel=2)
                return super().dims
    
            def __array__(
                self, dtype: np.typing.DTypeLike = None, /, *, copy: bool | None = None
            ) -> np.ndarray:
                warnings.warn("warning in test", stacklevel=2)
                return super().__array__(dtype, copy=copy)
    
        a = WarningVariable("x", [1])
        b = WarningVariable("x", [2])
    
        with warnings.catch_warnings(record=True) as w:
            # elevate warnings to errors
            warnings.filterwarnings("error")
            with pytest.raises(AssertionError):
>               getattr(xr.testing, func)(a, b)

#x1B[1m#x1B[31m/home/runner/work/xarray/xarray/xarray/tests/test_assertions.py#x1B[0m:189: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
#x1B[1m#x1B[31m/home/runner/work/xarray/xarray/xarray/core/duck_array_ops.py#x1B[0m:314: in array_equiv
    flag_array = (arr1 == arr2) | (isnull(arr1) & isnull(arr2))
#x1B[1m#x1B[31m/home/runner/work/xarray/xarray/xarray/core/duck_array_ops.py#x1B[0m:137: in isnull
    xp = get_array_namespace(data)
#x1B[1m#x1B[31m/home/runner/work/xarray/xarray/xarray/core/duck_array_ops.py#x1B[0m:65: in get_array_namespace
    namespaces = {_get_array_namespace(t) for t in values}
#x1B[1m#x1B[31m/home/runner/work/xarray/xarray/xarray/core/duck_array_ops.py#x1B[0m:65: in <setcomp>
    namespaces = {_get_array_namespace(t) for t in values}
#x1B[1m#x1B[31m/home/runner/work/xarray/xarray/xarray/core/duck_array_ops.py#x1B[0m:61: in _get_array_namespace
    return x.__array_namespace__()
#x1B[1m#x1B[31m/home/runner/work/xarray/xarray/xarray/namedarray/core.py#x1B[0m:462: in __array_namespace__
    import xarray.namedarray._array_api as array_api
#x1B[1m#x1B[31m/home/runner/work/xarray/xarray/xarray/namedarray/_array_api/__init__.py#x1B[0m:71: in <module>
    from xarray.namedarray._array_api._dtypes import (
#x1B[1m#x1B[31m/home/runner/work/xarray/xarray/xarray/namedarray/_array_api/_dtypes.py#x1B[0m:18: in <module>
    bool = _xp.bool
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

attr = 'bool'

    def __getattr__(attr):
        # Warn for expired attributes, and return a dummy function
        # that always raises an exception.
        import warnings
        try:
            msg = __expired_functions__[attr]
        except KeyError:
            pass
        else:
            warnings.warn(msg, DeprecationWarning, stacklevel=2)
    
            def _expired(*args, **kwds):
                raise RuntimeError(msg)
    
            return _expired
    
        # Emit warnings for deprecated attributes
        try:
            val, msg = __deprecated_attrs__[attr]
        except KeyError:
            pass
        else:
            warnings.warn(msg, DeprecationWarning, stacklevel=2)
            return val
    
        if attr in __future_scalars__:
            # And future warnings for those that will change, but also give
            # the AttributeError
            warnings.warn(
                f"In the future `np.{attr}` will be defined as the "
                "corresponding NumPy scalar.", FutureWarning, stacklevel=2)
    
        if attr in __former_attrs__:
>           raise AttributeError(__former_attrs__[attr])
#x1B[1m#x1B[31mE           AttributeError: module 'numpy' has no attribute 'bool'.#x1B[0m
#x1B[1m#x1B[31mE           `np.bool` was a deprecated alias for the builtin `bool`. To avoid this error in existing code, use `bool` by itself. Doing this will not modify any behavior and is safe. If you specifically wanted the numpy scalar type, use `np.bool_` here.#x1B[0m
#x1B[1m#x1B[31mE           The aliases was originally deprecated in NumPy 1.20; for more details and guidance see the original release note at:#x1B[0m
#x1B[1m#x1B[31mE               https://numpy.org/devdocs/release/1.20.0-notes.html#deprecations. Did you mean: 'bool_'?#x1B[0m

#x1B[1m#x1B[31m/home/runner/micromamba/envs/xarray-tests/lib/python3.10/site-packages/numpy/__init__.py#x1B[0m:305: AttributeError

Check warning on line 0 in xarray.tests.test_dataarray.TestDataArray

See this annotation in the file changed.

@github-actions github-actions / Test Results

1 out of 9 runs failed: test_reset_index (xarray.tests.test_dataarray.TestDataArray)

artifacts/Test results for Linux-3.10 bare-minimum/pytest.xml [took 0s]
Raw output
FutureWarning: In the future `np.bool` will be defined as the corresponding NumPy scalar.
self = <xarray.tests.test_dataarray.TestDataArray object at 0x7ffad5faf970>

    def test_reset_index(self) -> None:
        indexes = [self.mindex.get_level_values(n) for n in self.mindex.names]
        coords = {idx.name: ("x", idx) for idx in indexes}
        expected = DataArray(self.mda.values, coords=coords, dims="x")
    
        obj = self.mda.reset_index("x")
        assert_identical(obj, expected, check_default_indexes=False)
        assert len(obj.xindexes) == 0
        obj = self.mda.reset_index(self.mindex.names)
        assert_identical(obj, expected, check_default_indexes=False)
        assert len(obj.xindexes) == 0
        obj = self.mda.reset_index(["x", "level_1"])
        assert_identical(obj, expected, check_default_indexes=False)
        assert len(obj.xindexes) == 0
    
        coords = {
            "x": ("x", self.mindex.droplevel("level_1")),
            "level_1": ("x", self.mindex.get_level_values("level_1")),
        }
        expected = DataArray(self.mda.values, coords=coords, dims="x")
        obj = self.mda.reset_index(["level_1"])
        assert_identical(obj, expected, check_default_indexes=False)
        assert list(obj.xindexes) == ["x"]
        assert type(obj.xindexes["x"]) is PandasIndex
    
        expected = DataArray(self.mda.values, dims="x")
        obj = self.mda.reset_index("x", drop=True)
        assert_identical(obj, expected, check_default_indexes=False)
    
        array = self.mda.copy()
        array = array.reset_index(["x"], drop=True)
        assert_identical(array, expected, check_default_indexes=False)
    
        # single index
        array = DataArray([1, 2], coords={"x": ["a", "b"]}, dims="x")
        obj = array.reset_index("x")
>       print(obj.x.variable)

#x1B[1m#x1B[31m/home/runner/work/xarray/xarray/xarray/tests/test_dataarray.py#x1B[0m:2187: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
#x1B[1m#x1B[31m/home/runner/work/xarray/xarray/xarray/core/common.py#x1B[0m:183: in __repr__
    return formatting.array_repr(self)
#x1B[1m#x1B[31m/home/runner/micromamba/envs/xarray-tests/lib/python3.10/reprlib.py#x1B[0m:21: in wrapper
    result = user_function(self)
#x1B[1m#x1B[31m/home/runner/work/xarray/xarray/xarray/core/formatting.py#x1B[0m:698: in array_repr
    nbytes_str = render_human_readable_nbytes(arr.nbytes)
#x1B[1m#x1B[31m/home/runner/work/xarray/xarray/xarray/namedarray/core.py#x1B[0m:925: in nbytes
    from xarray.namedarray._array_api._utils import _get_data_namespace
#x1B[1m#x1B[31m/home/runner/work/xarray/xarray/xarray/namedarray/_array_api/__init__.py#x1B[0m:71: in <module>
    from xarray.namedarray._array_api._dtypes import (
#x1B[1m#x1B[31m/home/runner/work/xarray/xarray/xarray/namedarray/_array_api/_dtypes.py#x1B[0m:18: in <module>
    bool = _xp.bool
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

attr = 'bool'

    def __getattr__(attr):
        # Warn for expired attributes, and return a dummy function
        # that always raises an exception.
        import warnings
        try:
            msg = __expired_functions__[attr]
        except KeyError:
            pass
        else:
            warnings.warn(msg, DeprecationWarning, stacklevel=2)
    
            def _expired(*args, **kwds):
                raise RuntimeError(msg)
    
            return _expired
    
        # Emit warnings for deprecated attributes
        try:
            val, msg = __deprecated_attrs__[attr]
        except KeyError:
            pass
        else:
            warnings.warn(msg, DeprecationWarning, stacklevel=2)
            return val
    
        if attr in __future_scalars__:
            # And future warnings for those that will change, but also give
            # the AttributeError
>           warnings.warn(
                f"In the future `np.{attr}` will be defined as the "
                "corresponding NumPy scalar.", FutureWarning, stacklevel=2)
#x1B[1m#x1B[31mE           FutureWarning: In the future `np.bool` will be defined as the corresponding NumPy scalar.#x1B[0m

#x1B[1m#x1B[31m/home/runner/micromamba/envs/xarray-tests/lib/python3.10/site-packages/numpy/__init__.py#x1B[0m:300: FutureWarning

Check warning on line 0 in xarray.tests.test_computation

See this annotation in the file changed.

@github-actions github-actions / Test Results

1 out of 9 runs failed: test_apply_missing_dims (xarray.tests.test_computation)

artifacts/Test results for Linux-3.10 bare-minimum/pytest.xml [took 0s]
Raw output
FutureWarning: In the future `np.bool` will be defined as the corresponding NumPy scalar.
def test_apply_missing_dims() -> None:
        ## Single arg
    
        def add_one(a, core_dims, on_missing_core_dim):
            return apply_ufunc(
                lambda x: x + 1,
                a,
                input_core_dims=core_dims,
                output_core_dims=core_dims,
                on_missing_core_dim=on_missing_core_dim,
            )
    
        array = np.arange(6).reshape(2, 3)
        variable = xr.Variable(["x", "y"], array)
        variable_no_y = xr.Variable(["x", "z"], array)
    
        ds = xr.Dataset({"x_y": variable, "x_z": variable_no_y})
    
        # Check the standard stuff works OK
        assert_identical(
            add_one(ds[["x_y"]], core_dims=[["y"]], on_missing_core_dim="raise"),
            ds[["x_y"]] + 1,
        )
    
        # `raise` — should raise on a missing dim
        with pytest.raises(ValueError):
>           add_one(ds, core_dims=[["y"]], on_missing_core_dim="raise")

#x1B[1m#x1B[31m/home/runner/work/xarray/xarray/xarray/tests/test_computation.py#x1B[0m:286: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
#x1B[1m#x1B[31m/home/runner/work/xarray/xarray/xarray/tests/test_computation.py#x1B[0m:264: in add_one
    return apply_ufunc(
#x1B[1m#x1B[31m/home/runner/work/xarray/xarray/xarray/core/computation.py#x1B[0m:1265: in apply_ufunc
    return apply_dataset_vfunc(
#x1B[1m#x1B[31m/home/runner/work/xarray/xarray/xarray/core/computation.py#x1B[0m:536: in apply_dataset_vfunc
    result_vars = apply_dict_of_variables_vfunc(
#x1B[1m#x1B[31m/home/runner/work/xarray/xarray/xarray/core/computation.py#x1B[0m:458: in apply_dict_of_variables_vfunc
    core_dim_present = _check_core_dims(signature, variable_args, name)
#x1B[1m#x1B[31m/home/runner/work/xarray/xarray/xarray/core/computation.py#x1B[0m:435: in _check_core_dims
    message += f"Missing core dims {set(core_dims) - set(variable_arg.dims)} from arg number {i + 1} on a variable named `{name}`:\n{variable_arg}\n\n"
#x1B[1m#x1B[31m/home/runner/work/xarray/xarray/xarray/core/common.py#x1B[0m:205: in __format__
    return self.__repr__()
#x1B[1m#x1B[31m/home/runner/work/xarray/xarray/xarray/core/common.py#x1B[0m:183: in __repr__
    return formatting.array_repr(self)
#x1B[1m#x1B[31m/home/runner/micromamba/envs/xarray-tests/lib/python3.10/reprlib.py#x1B[0m:21: in wrapper
    result = user_function(self)
#x1B[1m#x1B[31m/home/runner/work/xarray/xarray/xarray/core/formatting.py#x1B[0m:698: in array_repr
    nbytes_str = render_human_readable_nbytes(arr.nbytes)
#x1B[1m#x1B[31m/home/runner/work/xarray/xarray/xarray/namedarray/core.py#x1B[0m:925: in nbytes
    from xarray.namedarray._array_api._utils import _get_data_namespace
#x1B[1m#x1B[31m/home/runner/work/xarray/xarray/xarray/namedarray/_array_api/__init__.py#x1B[0m:71: in <module>
    from xarray.namedarray._array_api._dtypes import (
#x1B[1m#x1B[31m/home/runner/work/xarray/xarray/xarray/namedarray/_array_api/_dtypes.py#x1B[0m:18: in <module>
    bool = _xp.bool
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

attr = 'bool'

    def __getattr__(attr):
        # Warn for expired attributes, and return a dummy function
        # that always raises an exception.
        import warnings
        try:
            msg = __expired_functions__[attr]
        except KeyError:
            pass
        else:
            warnings.warn(msg, DeprecationWarning, stacklevel=2)
    
            def _expired(*args, **kwds):
                raise RuntimeError(msg)
    
            return _expired
    
        # Emit warnings for deprecated attributes
        try:
            val, msg = __deprecated_attrs__[attr]
        except KeyError:
            pass
        else:
            warnings.warn(msg, DeprecationWarning, stacklevel=2)
            return val
    
        if attr in __future_scalars__:
            # And future warnings for those that will change, but also give
            # the AttributeError
>           warnings.warn(
                f"In the future `np.{attr}` will be defined as the "
                "corresponding NumPy scalar.", FutureWarning, stacklevel=2)
#x1B[1m#x1B[31mE           FutureWarning: In the future `np.bool` will be defined as the corresponding NumPy scalar.#x1B[0m

#x1B[1m#x1B[31m/home/runner/micromamba/envs/xarray-tests/lib/python3.10/site-packages/numpy/__init__.py#x1B[0m:300: FutureWarning

Check warning on line 0 in xarray.tests.test_rolling.TestDataArrayRolling

See this annotation in the file changed.

@github-actions github-actions / Test Results

3 out of 9 runs failed: test_repeated_rolling_rechunks (xarray.tests.test_rolling.TestDataArrayRolling)

artifacts/Test results for Linux-3.10 min-all-deps/pytest.xml [took 0s]
artifacts/Test results for Windows-3.10/pytest.xml [took 0s]
artifacts/Test results for Windows-3.12/pytest.xml [took 0s]
Raw output
FutureWarning: In the future `np.bool` will be defined as the corresponding NumPy scalar.
self = <xarray.tests.test_rolling.TestDataArrayRolling object at 0x000001D945C439A0>

    @requires_dask
    def test_repeated_rolling_rechunks(self) -> None:
        # regression test for GH3277, GH2514
        dat = DataArray(np.random.rand(7653, 300), dims=("day", "item"))
        dat_chunk = dat.chunk({"item": 20})
>       dat_chunk.rolling(day=10).mean().rolling(day=250).std()

#x1B[1m#x1B[31mD:\a\xarray\xarray\xarray\tests\test_rolling.py#x1B[0m:84: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
#x1B[1m#x1B[31mD:\a\xarray\xarray\xarray\core\rolling.py#x1B[0m:177: in method
    return self._array_reduce(
#x1B[1m#x1B[31mD:\a\xarray\xarray\xarray\core\rolling.py#x1B[0m:693: in _array_reduce
    return self.reduce(array_agg_func, keep_attrs=keep_attrs, **kwargs)
#x1B[1m#x1B[31mD:\a\xarray\xarray\xarray\core\rolling.py#x1B[0m:499: in reduce
    windows = self._construct(
#x1B[1m#x1B[31mD:\a\xarray\xarray\xarray\core\rolling.py#x1B[0m:414: in _construct
    window = obj.variable.rolling_window(
#x1B[1m#x1B[31mD:\a\xarray\xarray\xarray\core\variable.py#x1B[0m:2072: in rolling_window
    var = duck_array_ops.astype(self, dtype, copy=False)
#x1B[1m#x1B[31mD:\a\xarray\xarray\xarray\core\duck_array_ops.py#x1B[0m:210: in astype
    xp = get_array_namespace(data)
#x1B[1m#x1B[31mD:\a\xarray\xarray\xarray\core\duck_array_ops.py#x1B[0m:65: in get_array_namespace
    namespaces = {_get_array_namespace(t) for t in values}
#x1B[1m#x1B[31mD:\a\xarray\xarray\xarray\core\duck_array_ops.py#x1B[0m:65: in <setcomp>
    namespaces = {_get_array_namespace(t) for t in values}
#x1B[1m#x1B[31mD:\a\xarray\xarray\xarray\core\duck_array_ops.py#x1B[0m:61: in _get_array_namespace
    return x.__array_namespace__()
#x1B[1m#x1B[31mD:\a\xarray\xarray\xarray\namedarray\core.py#x1B[0m:462: in __array_namespace__
    import xarray.namedarray._array_api as array_api
#x1B[1m#x1B[31mD:\a\xarray\xarray\xarray\namedarray\_array_api\__init__.py#x1B[0m:71: in <module>
    from xarray.namedarray._array_api._dtypes import (
#x1B[1m#x1B[31mD:\a\xarray\xarray\xarray\namedarray\_array_api\_dtypes.py#x1B[0m:18: in <module>
    bool = _xp.bool
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

attr = 'bool'

    def __getattr__(attr):
        # Warn for expired attributes, and return a dummy function
        # that always raises an exception.
        import warnings
        import math
        try:
            msg = __expired_functions__[attr]
        except KeyError:
            pass
        else:
            warnings.warn(msg, DeprecationWarning, stacklevel=2)
    
            def _expired(*args, **kwds):
                raise RuntimeError(msg)
    
            return _expired
    
        # Emit warnings for deprecated attributes
        try:
            val, msg = __deprecated_attrs__[attr]
        except KeyError:
            pass
        else:
            warnings.warn(msg, DeprecationWarning, stacklevel=2)
            return val
    
        if attr in __future_scalars__:
            # And future warnings for those that will change, but also give
            # the AttributeError
>           warnings.warn(
                f"In the future `np.{attr}` will be defined as the "
                "corresponding NumPy scalar.", FutureWarning, stacklevel=2)
#x1B[1m#x1B[31mE           FutureWarning: In the future `np.bool` will be defined as the corresponding NumPy scalar.#x1B[0m

#x1B[1m#x1B[31mC:\Users\runneradmin\micromamba\envs\xarray-tests\lib\site-packages\numpy\__init__.py#x1B[0m:319: FutureWarning

Check warning on line 0 in xarray.tests.test_rolling.TestDataArrayRolling

See this annotation in the file changed.

@github-actions github-actions / Test Results

3 out of 9 runs failed: test_rolling_wrapped_bottleneck[1-numbagg-numpy-1-True-std] (xarray.tests.test_rolling.TestDataArrayRolling)

artifacts/Test results for Linux-3.10 min-all-deps/pytest.xml [took 0s]
artifacts/Test results for Windows-3.10/pytest.xml [took 0s]
artifacts/Test results for Windows-3.12/pytest.xml [took 0s]
Raw output
FutureWarning: In the future `np.bool` will be defined as the corresponding NumPy scalar.
self = <xarray.tests.test_rolling.TestDataArrayRolling object at 0x000001D945C410C0>
da = <xarray.DataArray (a: 3, time: 21, x: 4)> Size: 2kB
array([[[0.5488135 , 0.71518937, 0.60276338, 0.54488318],
        ...ates:
  * time     (time) datetime64[ns] 168B 2000-01-01 2000-01-02 ... 2000-01-21
Dimensions without coordinates: a, x
name = 'std', center = True, min_periods = 1, compute_backend = 'numbagg'

    @pytest.mark.parametrize(
        "name", ("sum", "mean", "std", "min", "max", "median", "argmin", "argmax")
    )
    @pytest.mark.parametrize("center", (True, False, None))
    @pytest.mark.parametrize("min_periods", (1, None))
    @pytest.mark.parametrize("backend", ["numpy"], indirect=True)
    def test_rolling_wrapped_bottleneck(
        self, da, name, center, min_periods, compute_backend
    ) -> None:
        bn = pytest.importorskip("bottleneck", minversion="1.1")
        # Test all bottleneck functions
        rolling_obj = da.rolling(time=7, min_periods=min_periods)
    
        func_name = f"move_{name}"
>       actual = getattr(rolling_obj, name)()

#x1B[1m#x1B[31mD:\a\xarray\xarray\xarray\tests\test_rolling.py#x1B[0m:124: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
#x1B[1m#x1B[31mD:\a\xarray\xarray\xarray\core\rolling.py#x1B[0m:177: in method
    return self._array_reduce(
#x1B[1m#x1B[31mD:\a\xarray\xarray\xarray\core\rolling.py#x1B[0m:693: in _array_reduce
    return self.reduce(array_agg_func, keep_attrs=keep_attrs, **kwargs)
#x1B[1m#x1B[31mD:\a\xarray\xarray\xarray\core\rolling.py#x1B[0m:499: in reduce
    windows = self._construct(
#x1B[1m#x1B[31mD:\a\xarray\xarray\xarray\core\rolling.py#x1B[0m:414: in _construct
    window = obj.variable.rolling_window(
#x1B[1m#x1B[31mD:\a\xarray\xarray\xarray\core\variable.py#x1B[0m:2072: in rolling_window
    var = duck_array_ops.astype(self, dtype, copy=False)
#x1B[1m#x1B[31mD:\a\xarray\xarray\xarray\core\duck_array_ops.py#x1B[0m:210: in astype
    xp = get_array_namespace(data)
#x1B[1m#x1B[31mD:\a\xarray\xarray\xarray\core\duck_array_ops.py#x1B[0m:65: in get_array_namespace
    namespaces = {_get_array_namespace(t) for t in values}
#x1B[1m#x1B[31mD:\a\xarray\xarray\xarray\core\duck_array_ops.py#x1B[0m:65: in <setcomp>
    namespaces = {_get_array_namespace(t) for t in values}
#x1B[1m#x1B[31mD:\a\xarray\xarray\xarray\core\duck_array_ops.py#x1B[0m:61: in _get_array_namespace
    return x.__array_namespace__()
#x1B[1m#x1B[31mD:\a\xarray\xarray\xarray\namedarray\core.py#x1B[0m:462: in __array_namespace__
    import xarray.namedarray._array_api as array_api
#x1B[1m#x1B[31mD:\a\xarray\xarray\xarray\namedarray\_array_api\__init__.py#x1B[0m:71: in <module>
    from xarray.namedarray._array_api._dtypes import (
#x1B[1m#x1B[31mD:\a\xarray\xarray\xarray\namedarray\_array_api\_dtypes.py#x1B[0m:18: in <module>
    bool = _xp.bool
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

attr = 'bool'

    def __getattr__(attr):
        # Warn for expired attributes, and return a dummy function
        # that always raises an exception.
        import warnings
        import math
        try:
            msg = __expired_functions__[attr]
        except KeyError:
            pass
        else:
            warnings.warn(msg, DeprecationWarning, stacklevel=2)
    
            def _expired(*args, **kwds):
                raise RuntimeError(msg)
    
            return _expired
    
        # Emit warnings for deprecated attributes
        try:
            val, msg = __deprecated_attrs__[attr]
        except KeyError:
            pass
        else:
            warnings.warn(msg, DeprecationWarning, stacklevel=2)
            return val
    
        if attr in __future_scalars__:
            # And future warnings for those that will change, but also give
            # the AttributeError
>           warnings.warn(
                f"In the future `np.{attr}` will be defined as the "
                "corresponding NumPy scalar.", FutureWarning, stacklevel=2)
#x1B[1m#x1B[31mE           FutureWarning: In the future `np.bool` will be defined as the corresponding NumPy scalar.#x1B[0m

#x1B[1m#x1B[31mC:\Users\runneradmin\micromamba\envs\xarray-tests\lib\site-packages\numpy\__init__.py#x1B[0m:319: FutureWarning

Check warning on line 0 in xarray.tests.test_rolling.TestDataArrayRolling

See this annotation in the file changed.

@github-actions github-actions / Test Results

3 out of 9 runs failed: test_rolling_wrapped_bottleneck[1-numbagg-numpy-1-True-median] (xarray.tests.test_rolling.TestDataArrayRolling)

artifacts/Test results for Linux-3.10 min-all-deps/pytest.xml [took 0s]
artifacts/Test results for Windows-3.10/pytest.xml [took 0s]
artifacts/Test results for Windows-3.12/pytest.xml [took 0s]
Raw output
FutureWarning: In the future `np.bool` will be defined as the corresponding NumPy scalar.
self = <xarray.tests.test_rolling.TestDataArrayRolling object at 0x000001D945C41540>
da = <xarray.DataArray (a: 3, time: 21, x: 4)> Size: 2kB
array([[[0.5488135 , 0.71518937, 0.60276338, 0.54488318],
        ...ates:
  * time     (time) datetime64[ns] 168B 2000-01-01 2000-01-02 ... 2000-01-21
Dimensions without coordinates: a, x
name = 'median', center = True, min_periods = 1, compute_backend = 'numbagg'

    @pytest.mark.parametrize(
        "name", ("sum", "mean", "std", "min", "max", "median", "argmin", "argmax")
    )
    @pytest.mark.parametrize("center", (True, False, None))
    @pytest.mark.parametrize("min_periods", (1, None))
    @pytest.mark.parametrize("backend", ["numpy"], indirect=True)
    def test_rolling_wrapped_bottleneck(
        self, da, name, center, min_periods, compute_backend
    ) -> None:
        bn = pytest.importorskip("bottleneck", minversion="1.1")
        # Test all bottleneck functions
        rolling_obj = da.rolling(time=7, min_periods=min_periods)
    
        func_name = f"move_{name}"
>       actual = getattr(rolling_obj, name)()

#x1B[1m#x1B[31mD:\a\xarray\xarray\xarray\tests\test_rolling.py#x1B[0m:124: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
#x1B[1m#x1B[31mD:\a\xarray\xarray\xarray\core\rolling.py#x1B[0m:177: in method
    return self._array_reduce(
#x1B[1m#x1B[31mD:\a\xarray\xarray\xarray\core\rolling.py#x1B[0m:693: in _array_reduce
    return self.reduce(array_agg_func, keep_attrs=keep_attrs, **kwargs)
#x1B[1m#x1B[31mD:\a\xarray\xarray\xarray\core\rolling.py#x1B[0m:499: in reduce
    windows = self._construct(
#x1B[1m#x1B[31mD:\a\xarray\xarray\xarray\core\rolling.py#x1B[0m:414: in _construct
    window = obj.variable.rolling_window(
#x1B[1m#x1B[31mD:\a\xarray\xarray\xarray\core\variable.py#x1B[0m:2072: in rolling_window
    var = duck_array_ops.astype(self, dtype, copy=False)
#x1B[1m#x1B[31mD:\a\xarray\xarray\xarray\core\duck_array_ops.py#x1B[0m:210: in astype
    xp = get_array_namespace(data)
#x1B[1m#x1B[31mD:\a\xarray\xarray\xarray\core\duck_array_ops.py#x1B[0m:65: in get_array_namespace
    namespaces = {_get_array_namespace(t) for t in values}
#x1B[1m#x1B[31mD:\a\xarray\xarray\xarray\core\duck_array_ops.py#x1B[0m:65: in <setcomp>
    namespaces = {_get_array_namespace(t) for t in values}
#x1B[1m#x1B[31mD:\a\xarray\xarray\xarray\core\duck_array_ops.py#x1B[0m:61: in _get_array_namespace
    return x.__array_namespace__()
#x1B[1m#x1B[31mD:\a\xarray\xarray\xarray\namedarray\core.py#x1B[0m:462: in __array_namespace__
    import xarray.namedarray._array_api as array_api
#x1B[1m#x1B[31mD:\a\xarray\xarray\xarray\namedarray\_array_api\__init__.py#x1B[0m:71: in <module>
    from xarray.namedarray._array_api._dtypes import (
#x1B[1m#x1B[31mD:\a\xarray\xarray\xarray\namedarray\_array_api\_dtypes.py#x1B[0m:18: in <module>
    bool = _xp.bool
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

attr = 'bool'

    def __getattr__(attr):
        # Warn for expired attributes, and return a dummy function
        # that always raises an exception.
        import warnings
        import math
        try:
            msg = __expired_functions__[attr]
        except KeyError:
            pass
        else:
            warnings.warn(msg, DeprecationWarning, stacklevel=2)
    
            def _expired(*args, **kwds):
                raise RuntimeError(msg)
    
            return _expired
    
        # Emit warnings for deprecated attributes
        try:
            val, msg = __deprecated_attrs__[attr]
        except KeyError:
            pass
        else:
            warnings.warn(msg, DeprecationWarning, stacklevel=2)
            return val
    
        if attr in __future_scalars__:
            # And future warnings for those that will change, but also give
            # the AttributeError
>           warnings.warn(
                f"In the future `np.{attr}` will be defined as the "
                "corresponding NumPy scalar.", FutureWarning, stacklevel=2)
#x1B[1m#x1B[31mE           FutureWarning: In the future `np.bool` will be defined as the corresponding NumPy scalar.#x1B[0m

#x1B[1m#x1B[31mC:\Users\runneradmin\micromamba\envs\xarray-tests\lib\site-packages\numpy\__init__.py#x1B[0m:319: FutureWarning

Check warning on line 0 in xarray.tests.test_rolling.TestDataArrayRolling

See this annotation in the file changed.

@github-actions github-actions / Test Results

3 out of 9 runs failed: test_rolling_wrapped_bottleneck[1-numbagg-numpy-1-False-std] (xarray.tests.test_rolling.TestDataArrayRolling)

artifacts/Test results for Linux-3.10 min-all-deps/pytest.xml [took 0s]
artifacts/Test results for Windows-3.10/pytest.xml [took 0s]
artifacts/Test results for Windows-3.12/pytest.xml [took 0s]
Raw output
FutureWarning: In the future `np.bool` will be defined as the corresponding NumPy scalar.
self = <xarray.tests.test_rolling.TestDataArrayRolling object at 0x000001D945C19D80>
da = <xarray.DataArray (a: 3, time: 21, x: 4)> Size: 2kB
array([[[0.5488135 , 0.71518937, 0.60276338, 0.54488318],
        ...ates:
  * time     (time) datetime64[ns] 168B 2000-01-01 2000-01-02 ... 2000-01-21
Dimensions without coordinates: a, x
name = 'std', center = False, min_periods = 1, compute_backend = 'numbagg'

    @pytest.mark.parametrize(
        "name", ("sum", "mean", "std", "min", "max", "median", "argmin", "argmax")
    )
    @pytest.mark.parametrize("center", (True, False, None))
    @pytest.mark.parametrize("min_periods", (1, None))
    @pytest.mark.parametrize("backend", ["numpy"], indirect=True)
    def test_rolling_wrapped_bottleneck(
        self, da, name, center, min_periods, compute_backend
    ) -> None:
        bn = pytest.importorskip("bottleneck", minversion="1.1")
        # Test all bottleneck functions
        rolling_obj = da.rolling(time=7, min_periods=min_periods)
    
        func_name = f"move_{name}"
>       actual = getattr(rolling_obj, name)()

#x1B[1m#x1B[31mD:\a\xarray\xarray\xarray\tests\test_rolling.py#x1B[0m:124: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
#x1B[1m#x1B[31mD:\a\xarray\xarray\xarray\core\rolling.py#x1B[0m:177: in method
    return self._array_reduce(
#x1B[1m#x1B[31mD:\a\xarray\xarray\xarray\core\rolling.py#x1B[0m:693: in _array_reduce
    return self.reduce(array_agg_func, keep_attrs=keep_attrs, **kwargs)
#x1B[1m#x1B[31mD:\a\xarray\xarray\xarray\core\rolling.py#x1B[0m:499: in reduce
    windows = self._construct(
#x1B[1m#x1B[31mD:\a\xarray\xarray\xarray\core\rolling.py#x1B[0m:414: in _construct
    window = obj.variable.rolling_window(
#x1B[1m#x1B[31mD:\a\xarray\xarray\xarray\core\variable.py#x1B[0m:2072: in rolling_window
    var = duck_array_ops.astype(self, dtype, copy=False)
#x1B[1m#x1B[31mD:\a\xarray\xarray\xarray\core\duck_array_ops.py#x1B[0m:210: in astype
    xp = get_array_namespace(data)
#x1B[1m#x1B[31mD:\a\xarray\xarray\xarray\core\duck_array_ops.py#x1B[0m:65: in get_array_namespace
    namespaces = {_get_array_namespace(t) for t in values}
#x1B[1m#x1B[31mD:\a\xarray\xarray\xarray\core\duck_array_ops.py#x1B[0m:65: in <setcomp>
    namespaces = {_get_array_namespace(t) for t in values}
#x1B[1m#x1B[31mD:\a\xarray\xarray\xarray\core\duck_array_ops.py#x1B[0m:61: in _get_array_namespace
    return x.__array_namespace__()
#x1B[1m#x1B[31mD:\a\xarray\xarray\xarray\namedarray\core.py#x1B[0m:462: in __array_namespace__
    import xarray.namedarray._array_api as array_api
#x1B[1m#x1B[31mD:\a\xarray\xarray\xarray\namedarray\_array_api\__init__.py#x1B[0m:71: in <module>
    from xarray.namedarray._array_api._dtypes import (
#x1B[1m#x1B[31mD:\a\xarray\xarray\xarray\namedarray\_array_api\_dtypes.py#x1B[0m:18: in <module>
    bool = _xp.bool
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

attr = 'bool'

    def __getattr__(attr):
        # Warn for expired attributes, and return a dummy function
        # that always raises an exception.
        import warnings
        import math
        try:
            msg = __expired_functions__[attr]
        except KeyError:
            pass
        else:
            warnings.warn(msg, DeprecationWarning, stacklevel=2)
    
            def _expired(*args, **kwds):
                raise RuntimeError(msg)
    
            return _expired
    
        # Emit warnings for deprecated attributes
        try:
            val, msg = __deprecated_attrs__[attr]
        except KeyError:
            pass
        else:
            warnings.warn(msg, DeprecationWarning, stacklevel=2)
            return val
    
        if attr in __future_scalars__:
            # And future warnings for those that will change, but also give
            # the AttributeError
>           warnings.warn(
                f"In the future `np.{attr}` will be defined as the "
                "corresponding NumPy scalar.", FutureWarning, stacklevel=2)
#x1B[1m#x1B[31mE           FutureWarning: In the future `np.bool` will be defined as the corresponding NumPy scalar.#x1B[0m

#x1B[1m#x1B[31mC:\Users\runneradmin\micromamba\envs\xarray-tests\lib\site-packages\numpy\__init__.py#x1B[0m:319: FutureWarning

Check warning on line 0 in xarray.tests.test_rolling.TestDataArrayRolling

See this annotation in the file changed.

@github-actions github-actions / Test Results

3 out of 9 runs failed: test_rolling_wrapped_bottleneck[1-numbagg-numpy-1-False-median] (xarray.tests.test_rolling.TestDataArrayRolling)

artifacts/Test results for Linux-3.10 min-all-deps/pytest.xml [took 0s]
artifacts/Test results for Windows-3.10/pytest.xml [took 0s]
artifacts/Test results for Windows-3.12/pytest.xml [took 0s]
Raw output
FutureWarning: In the future `np.bool` will be defined as the corresponding NumPy scalar.
self = <xarray.tests.test_rolling.TestDataArrayRolling object at 0x000001D945C19D50>
da = <xarray.DataArray (a: 3, time: 21, x: 4)> Size: 2kB
array([[[0.5488135 , 0.71518937, 0.60276338, 0.54488318],
        ...ates:
  * time     (time) datetime64[ns] 168B 2000-01-01 2000-01-02 ... 2000-01-21
Dimensions without coordinates: a, x
name = 'median', center = False, min_periods = 1, compute_backend = 'numbagg'

    @pytest.mark.parametrize(
        "name", ("sum", "mean", "std", "min", "max", "median", "argmin", "argmax")
    )
    @pytest.mark.parametrize("center", (True, False, None))
    @pytest.mark.parametrize("min_periods", (1, None))
    @pytest.mark.parametrize("backend", ["numpy"], indirect=True)
    def test_rolling_wrapped_bottleneck(
        self, da, name, center, min_periods, compute_backend
    ) -> None:
        bn = pytest.importorskip("bottleneck", minversion="1.1")
        # Test all bottleneck functions
        rolling_obj = da.rolling(time=7, min_periods=min_periods)
    
        func_name = f"move_{name}"
>       actual = getattr(rolling_obj, name)()

#x1B[1m#x1B[31mD:\a\xarray\xarray\xarray\tests\test_rolling.py#x1B[0m:124: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
#x1B[1m#x1B[31mD:\a\xarray\xarray\xarray\core\rolling.py#x1B[0m:177: in method
    return self._array_reduce(
#x1B[1m#x1B[31mD:\a\xarray\xarray\xarray\core\rolling.py#x1B[0m:693: in _array_reduce
    return self.reduce(array_agg_func, keep_attrs=keep_attrs, **kwargs)
#x1B[1m#x1B[31mD:\a\xarray\xarray\xarray\core\rolling.py#x1B[0m:499: in reduce
    windows = self._construct(
#x1B[1m#x1B[31mD:\a\xarray\xarray\xarray\core\rolling.py#x1B[0m:414: in _construct
    window = obj.variable.rolling_window(
#x1B[1m#x1B[31mD:\a\xarray\xarray\xarray\core\variable.py#x1B[0m:2072: in rolling_window
    var = duck_array_ops.astype(self, dtype, copy=False)
#x1B[1m#x1B[31mD:\a\xarray\xarray\xarray\core\duck_array_ops.py#x1B[0m:210: in astype
    xp = get_array_namespace(data)
#x1B[1m#x1B[31mD:\a\xarray\xarray\xarray\core\duck_array_ops.py#x1B[0m:65: in get_array_namespace
    namespaces = {_get_array_namespace(t) for t in values}
#x1B[1m#x1B[31mD:\a\xarray\xarray\xarray\core\duck_array_ops.py#x1B[0m:65: in <setcomp>
    namespaces = {_get_array_namespace(t) for t in values}
#x1B[1m#x1B[31mD:\a\xarray\xarray\xarray\core\duck_array_ops.py#x1B[0m:61: in _get_array_namespace
    return x.__array_namespace__()
#x1B[1m#x1B[31mD:\a\xarray\xarray\xarray\namedarray\core.py#x1B[0m:462: in __array_namespace__
    import xarray.namedarray._array_api as array_api
#x1B[1m#x1B[31mD:\a\xarray\xarray\xarray\namedarray\_array_api\__init__.py#x1B[0m:71: in <module>
    from xarray.namedarray._array_api._dtypes import (
#x1B[1m#x1B[31mD:\a\xarray\xarray\xarray\namedarray\_array_api\_dtypes.py#x1B[0m:18: in <module>
    bool = _xp.bool
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

attr = 'bool'

    def __getattr__(attr):
        # Warn for expired attributes, and return a dummy function
        # that always raises an exception.
        import warnings
        import math
        try:
            msg = __expired_functions__[attr]
        except KeyError:
            pass
        else:
            warnings.warn(msg, DeprecationWarning, stacklevel=2)
    
            def _expired(*args, **kwds):
                raise RuntimeError(msg)
    
            return _expired
    
        # Emit warnings for deprecated attributes
        try:
            val, msg = __deprecated_attrs__[attr]
        except KeyError:
            pass
        else:
            warnings.warn(msg, DeprecationWarning, stacklevel=2)
            return val
    
        if attr in __future_scalars__:
            # And future warnings for those that will change, but also give
            # the AttributeError
>           warnings.warn(
                f"In the future `np.{attr}` will be defined as the "
                "corresponding NumPy scalar.", FutureWarning, stacklevel=2)
#x1B[1m#x1B[31mE           FutureWarning: In the future `np.bool` will be defined as the corresponding NumPy scalar.#x1B[0m

#x1B[1m#x1B[31mC:\Users\runneradmin\micromamba\envs\xarray-tests\lib\site-packages\numpy\__init__.py#x1B[0m:319: FutureWarning

Check warning on line 0 in xarray.tests.test_rolling.TestDataArrayRolling

See this annotation in the file changed.

@github-actions github-actions / Test Results

3 out of 9 runs failed: test_rolling_wrapped_bottleneck[1-numbagg-numpy-1-None-std] (xarray.tests.test_rolling.TestDataArrayRolling)

artifacts/Test results for Linux-3.10 min-all-deps/pytest.xml [took 0s]
artifacts/Test results for Windows-3.10/pytest.xml [took 0s]
artifacts/Test results for Windows-3.12/pytest.xml [took 0s]
Raw output
FutureWarning: In the future `np.bool` will be defined as the corresponding NumPy scalar.
self = <xarray.tests.test_rolling.TestDataArrayRolling object at 0x000001D945C19000>
da = <xarray.DataArray (a: 3, time: 21, x: 4)> Size: 2kB
array([[[0.5488135 , 0.71518937, 0.60276338, 0.54488318],
        ...ates:
  * time     (time) datetime64[ns] 168B 2000-01-01 2000-01-02 ... 2000-01-21
Dimensions without coordinates: a, x
name = 'std', center = None, min_periods = 1, compute_backend = 'numbagg'

    @pytest.mark.parametrize(
        "name", ("sum", "mean", "std", "min", "max", "median", "argmin", "argmax")
    )
    @pytest.mark.parametrize("center", (True, False, None))
    @pytest.mark.parametrize("min_periods", (1, None))
    @pytest.mark.parametrize("backend", ["numpy"], indirect=True)
    def test_rolling_wrapped_bottleneck(
        self, da, name, center, min_periods, compute_backend
    ) -> None:
        bn = pytest.importorskip("bottleneck", minversion="1.1")
        # Test all bottleneck functions
        rolling_obj = da.rolling(time=7, min_periods=min_periods)
    
        func_name = f"move_{name}"
>       actual = getattr(rolling_obj, name)()

#x1B[1m#x1B[31mD:\a\xarray\xarray\xarray\tests\test_rolling.py#x1B[0m:124: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
#x1B[1m#x1B[31mD:\a\xarray\xarray\xarray\core\rolling.py#x1B[0m:177: in method
    return self._array_reduce(
#x1B[1m#x1B[31mD:\a\xarray\xarray\xarray\core\rolling.py#x1B[0m:693: in _array_reduce
    return self.reduce(array_agg_func, keep_attrs=keep_attrs, **kwargs)
#x1B[1m#x1B[31mD:\a\xarray\xarray\xarray\core\rolling.py#x1B[0m:499: in reduce
    windows = self._construct(
#x1B[1m#x1B[31mD:\a\xarray\xarray\xarray\core\rolling.py#x1B[0m:414: in _construct
    window = obj.variable.rolling_window(
#x1B[1m#x1B[31mD:\a\xarray\xarray\xarray\core\variable.py#x1B[0m:2072: in rolling_window
    var = duck_array_ops.astype(self, dtype, copy=False)
#x1B[1m#x1B[31mD:\a\xarray\xarray\xarray\core\duck_array_ops.py#x1B[0m:210: in astype
    xp = get_array_namespace(data)
#x1B[1m#x1B[31mD:\a\xarray\xarray\xarray\core\duck_array_ops.py#x1B[0m:65: in get_array_namespace
    namespaces = {_get_array_namespace(t) for t in values}
#x1B[1m#x1B[31mD:\a\xarray\xarray\xarray\core\duck_array_ops.py#x1B[0m:65: in <setcomp>
    namespaces = {_get_array_namespace(t) for t in values}
#x1B[1m#x1B[31mD:\a\xarray\xarray\xarray\core\duck_array_ops.py#x1B[0m:61: in _get_array_namespace
    return x.__array_namespace__()
#x1B[1m#x1B[31mD:\a\xarray\xarray\xarray\namedarray\core.py#x1B[0m:462: in __array_namespace__
    import xarray.namedarray._array_api as array_api
#x1B[1m#x1B[31mD:\a\xarray\xarray\xarray\namedarray\_array_api\__init__.py#x1B[0m:71: in <module>
    from xarray.namedarray._array_api._dtypes import (
#x1B[1m#x1B[31mD:\a\xarray\xarray\xarray\namedarray\_array_api\_dtypes.py#x1B[0m:18: in <module>
    bool = _xp.bool
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

attr = 'bool'

    def __getattr__(attr):
        # Warn for expired attributes, and return a dummy function
        # that always raises an exception.
        import warnings
        import math
        try:
            msg = __expired_functions__[attr]
        except KeyError:
            pass
        else:
            warnings.warn(msg, DeprecationWarning, stacklevel=2)
    
            def _expired(*args, **kwds):
                raise RuntimeError(msg)
    
            return _expired
    
        # Emit warnings for deprecated attributes
        try:
            val, msg = __deprecated_attrs__[attr]
        except KeyError:
            pass
        else:
            warnings.warn(msg, DeprecationWarning, stacklevel=2)
            return val
    
        if attr in __future_scalars__:
            # And future warnings for those that will change, but also give
            # the AttributeError
>           warnings.warn(
                f"In the future `np.{attr}` will be defined as the "
                "corresponding NumPy scalar.", FutureWarning, stacklevel=2)
#x1B[1m#x1B[31mE           FutureWarning: In the future `np.bool` will be defined as the corresponding NumPy scalar.#x1B[0m

#x1B[1m#x1B[31mC:\Users\runneradmin\micromamba\envs\xarray-tests\lib\site-packages\numpy\__init__.py#x1B[0m:319: FutureWarning

Check warning on line 0 in xarray.tests.test_rolling.TestDataArrayRolling

See this annotation in the file changed.

@github-actions github-actions / Test Results

3 out of 9 runs failed: test_rolling_wrapped_bottleneck[1-numbagg-numpy-1-None-median] (xarray.tests.test_rolling.TestDataArrayRolling)

artifacts/Test results for Linux-3.10 min-all-deps/pytest.xml [took 0s]
artifacts/Test results for Windows-3.10/pytest.xml [took 0s]
artifacts/Test results for Windows-3.12/pytest.xml [took 0s]
Raw output
FutureWarning: In the future `np.bool` will be defined as the corresponding NumPy scalar.
self = <xarray.tests.test_rolling.TestDataArrayRolling object at 0x000001D945C1AE90>
da = <xarray.DataArray (a: 3, time: 21, x: 4)> Size: 2kB
array([[[0.5488135 , 0.71518937, 0.60276338, 0.54488318],
        ...ates:
  * time     (time) datetime64[ns] 168B 2000-01-01 2000-01-02 ... 2000-01-21
Dimensions without coordinates: a, x
name = 'median', center = None, min_periods = 1, compute_backend = 'numbagg'

    @pytest.mark.parametrize(
        "name", ("sum", "mean", "std", "min", "max", "median", "argmin", "argmax")
    )
    @pytest.mark.parametrize("center", (True, False, None))
    @pytest.mark.parametrize("min_periods", (1, None))
    @pytest.mark.parametrize("backend", ["numpy"], indirect=True)
    def test_rolling_wrapped_bottleneck(
        self, da, name, center, min_periods, compute_backend
    ) -> None:
        bn = pytest.importorskip("bottleneck", minversion="1.1")
        # Test all bottleneck functions
        rolling_obj = da.rolling(time=7, min_periods=min_periods)
    
        func_name = f"move_{name}"
>       actual = getattr(rolling_obj, name)()

#x1B[1m#x1B[31mD:\a\xarray\xarray\xarray\tests\test_rolling.py#x1B[0m:124: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
#x1B[1m#x1B[31mD:\a\xarray\xarray\xarray\core\rolling.py#x1B[0m:177: in method
    return self._array_reduce(
#x1B[1m#x1B[31mD:\a\xarray\xarray\xarray\core\rolling.py#x1B[0m:693: in _array_reduce
    return self.reduce(array_agg_func, keep_attrs=keep_attrs, **kwargs)
#x1B[1m#x1B[31mD:\a\xarray\xarray\xarray\core\rolling.py#x1B[0m:499: in reduce
    windows = self._construct(
#x1B[1m#x1B[31mD:\a\xarray\xarray\xarray\core\rolling.py#x1B[0m:414: in _construct
    window = obj.variable.rolling_window(
#x1B[1m#x1B[31mD:\a\xarray\xarray\xarray\core\variable.py#x1B[0m:2072: in rolling_window
    var = duck_array_ops.astype(self, dtype, copy=False)
#x1B[1m#x1B[31mD:\a\xarray\xarray\xarray\core\duck_array_ops.py#x1B[0m:210: in astype
    xp = get_array_namespace(data)
#x1B[1m#x1B[31mD:\a\xarray\xarray\xarray\core\duck_array_ops.py#x1B[0m:65: in get_array_namespace
    namespaces = {_get_array_namespace(t) for t in values}
#x1B[1m#x1B[31mD:\a\xarray\xarray\xarray\core\duck_array_ops.py#x1B[0m:65: in <setcomp>
    namespaces = {_get_array_namespace(t) for t in values}
#x1B[1m#x1B[31mD:\a\xarray\xarray\xarray\core\duck_array_ops.py#x1B[0m:61: in _get_array_namespace
    return x.__array_namespace__()
#x1B[1m#x1B[31mD:\a\xarray\xarray\xarray\namedarray\core.py#x1B[0m:462: in __array_namespace__
    import xarray.namedarray._array_api as array_api
#x1B[1m#x1B[31mD:\a\xarray\xarray\xarray\namedarray\_array_api\__init__.py#x1B[0m:71: in <module>
    from xarray.namedarray._array_api._dtypes import (
#x1B[1m#x1B[31mD:\a\xarray\xarray\xarray\namedarray\_array_api\_dtypes.py#x1B[0m:18: in <module>
    bool = _xp.bool
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

attr = 'bool'

    def __getattr__(attr):
        # Warn for expired attributes, and return a dummy function
        # that always raises an exception.
        import warnings
        import math
        try:
            msg = __expired_functions__[attr]
        except KeyError:
            pass
        else:
            warnings.warn(msg, DeprecationWarning, stacklevel=2)
    
            def _expired(*args, **kwds):
                raise RuntimeError(msg)
    
            return _expired
    
        # Emit warnings for deprecated attributes
        try:
            val, msg = __deprecated_attrs__[attr]
        except KeyError:
            pass
        else:
            warnings.warn(msg, DeprecationWarning, stacklevel=2)
            return val
    
        if attr in __future_scalars__:
            # And future warnings for those that will change, but also give
            # the AttributeError
>           warnings.warn(
                f"In the future `np.{attr}` will be defined as the "
                "corresponding NumPy scalar.", FutureWarning, stacklevel=2)
#x1B[1m#x1B[31mE           FutureWarning: In the future `np.bool` will be defined as the corresponding NumPy scalar.#x1B[0m

#x1B[1m#x1B[31mC:\Users\runneradmin\micromamba\envs\xarray-tests\lib\site-packages\numpy\__init__.py#x1B[0m:319: FutureWarning

Check warning on line 0 in xarray.tests.test_rolling.TestDataArrayRolling

See this annotation in the file changed.

@github-actions github-actions / Test Results

3 out of 9 runs failed: test_rolling_wrapped_bottleneck[1-numbagg-numpy-None-True-std] (xarray.tests.test_rolling.TestDataArrayRolling)

artifacts/Test results for Linux-3.10 min-all-deps/pytest.xml [took 0s]
artifacts/Test results for Windows-3.10/pytest.xml [took 0s]
artifacts/Test results for Windows-3.12/pytest.xml [took 0s]
Raw output
FutureWarning: In the future `np.bool` will be defined as the corresponding NumPy scalar.
self = <xarray.tests.test_rolling.TestDataArrayRolling object at 0x000001D945C196C0>
da = <xarray.DataArray (a: 3, time: 21, x: 4)> Size: 2kB
array([[[0.5488135 , 0.71518937, 0.60276338, 0.54488318],
        ...ates:
  * time     (time) datetime64[ns] 168B 2000-01-01 2000-01-02 ... 2000-01-21
Dimensions without coordinates: a, x
name = 'std', center = True, min_periods = None, compute_backend = 'numbagg'

    @pytest.mark.parametrize(
        "name", ("sum", "mean", "std", "min", "max", "median", "argmin", "argmax")
    )
    @pytest.mark.parametrize("center", (True, False, None))
    @pytest.mark.parametrize("min_periods", (1, None))
    @pytest.mark.parametrize("backend", ["numpy"], indirect=True)
    def test_rolling_wrapped_bottleneck(
        self, da, name, center, min_periods, compute_backend
    ) -> None:
        bn = pytest.importorskip("bottleneck", minversion="1.1")
        # Test all bottleneck functions
        rolling_obj = da.rolling(time=7, min_periods=min_periods)
    
        func_name = f"move_{name}"
>       actual = getattr(rolling_obj, name)()

#x1B[1m#x1B[31mD:\a\xarray\xarray\xarray\tests\test_rolling.py#x1B[0m:124: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
#x1B[1m#x1B[31mD:\a\xarray\xarray\xarray\core\rolling.py#x1B[0m:177: in method
    return self._array_reduce(
#x1B[1m#x1B[31mD:\a\xarray\xarray\xarray\core\rolling.py#x1B[0m:693: in _array_reduce
    return self.reduce(array_agg_func, keep_attrs=keep_attrs, **kwargs)
#x1B[1m#x1B[31mD:\a\xarray\xarray\xarray\core\rolling.py#x1B[0m:499: in reduce
    windows = self._construct(
#x1B[1m#x1B[31mD:\a\xarray\xarray\xarray\core\rolling.py#x1B[0m:414: in _construct
    window = obj.variable.rolling_window(
#x1B[1m#x1B[31mD:\a\xarray\xarray\xarray\core\variable.py#x1B[0m:2072: in rolling_window
    var = duck_array_ops.astype(self, dtype, copy=False)
#x1B[1m#x1B[31mD:\a\xarray\xarray\xarray\core\duck_array_ops.py#x1B[0m:210: in astype
    xp = get_array_namespace(data)
#x1B[1m#x1B[31mD:\a\xarray\xarray\xarray\core\duck_array_ops.py#x1B[0m:65: in get_array_namespace
    namespaces = {_get_array_namespace(t) for t in values}
#x1B[1m#x1B[31mD:\a\xarray\xarray\xarray\core\duck_array_ops.py#x1B[0m:65: in <setcomp>
    namespaces = {_get_array_namespace(t) for t in values}
#x1B[1m#x1B[31mD:\a\xarray\xarray\xarray\core\duck_array_ops.py#x1B[0m:61: in _get_array_namespace
    return x.__array_namespace__()
#x1B[1m#x1B[31mD:\a\xarray\xarray\xarray\namedarray\core.py#x1B[0m:462: in __array_namespace__
    import xarray.namedarray._array_api as array_api
#x1B[1m#x1B[31mD:\a\xarray\xarray\xarray\namedarray\_array_api\__init__.py#x1B[0m:71: in <module>
    from xarray.namedarray._array_api._dtypes import (
#x1B[1m#x1B[31mD:\a\xarray\xarray\xarray\namedarray\_array_api\_dtypes.py#x1B[0m:18: in <module>
    bool = _xp.bool
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

attr = 'bool'

    def __getattr__(attr):
        # Warn for expired attributes, and return a dummy function
        # that always raises an exception.
        import warnings
        import math
        try:
            msg = __expired_functions__[attr]
        except KeyError:
            pass
        else:
            warnings.warn(msg, DeprecationWarning, stacklevel=2)
    
            def _expired(*args, **kwds):
                raise RuntimeError(msg)
    
            return _expired
    
        # Emit warnings for deprecated attributes
        try:
            val, msg = __deprecated_attrs__[attr]
        except KeyError:
            pass
        else:
            warnings.warn(msg, DeprecationWarning, stacklevel=2)
            return val
    
        if attr in __future_scalars__:
            # And future warnings for those that will change, but also give
            # the AttributeError
>           warnings.warn(
                f"In the future `np.{attr}` will be defined as the "
                "corresponding NumPy scalar.", FutureWarning, stacklevel=2)
#x1B[1m#x1B[31mE           FutureWarning: In the future `np.bool` will be defined as the corresponding NumPy scalar.#x1B[0m

#x1B[1m#x1B[31mC:\Users\runneradmin\micromamba\envs\xarray-tests\lib\site-packages\numpy\__init__.py#x1B[0m:319: FutureWarning

Check warning on line 0 in xarray.tests.test_rolling.TestDataArrayRolling

See this annotation in the file changed.

@github-actions github-actions / Test Results

3 out of 9 runs failed: test_rolling_wrapped_bottleneck[1-numbagg-numpy-None-True-median] (xarray.tests.test_rolling.TestDataArrayRolling)

artifacts/Test results for Linux-3.10 min-all-deps/pytest.xml [took 0s]
artifacts/Test results for Windows-3.10/pytest.xml [took 0s]
artifacts/Test results for Windows-3.12/pytest.xml [took 0s]
Raw output
FutureWarning: In the future `np.bool` will be defined as the corresponding NumPy scalar.
self = <xarray.tests.test_rolling.TestDataArrayRolling object at 0x000001D945C18A60>
da = <xarray.DataArray (a: 3, time: 21, x: 4)> Size: 2kB
array([[[0.5488135 , 0.71518937, 0.60276338, 0.54488318],
        ...ates:
  * time     (time) datetime64[ns] 168B 2000-01-01 2000-01-02 ... 2000-01-21
Dimensions without coordinates: a, x
name = 'median', center = True, min_periods = None, compute_backend = 'numbagg'

    @pytest.mark.parametrize(
        "name", ("sum", "mean", "std", "min", "max", "median", "argmin", "argmax")
    )
    @pytest.mark.parametrize("center", (True, False, None))
    @pytest.mark.parametrize("min_periods", (1, None))
    @pytest.mark.parametrize("backend", ["numpy"], indirect=True)
    def test_rolling_wrapped_bottleneck(
        self, da, name, center, min_periods, compute_backend
    ) -> None:
        bn = pytest.importorskip("bottleneck", minversion="1.1")
        # Test all bottleneck functions
        rolling_obj = da.rolling(time=7, min_periods=min_periods)
    
        func_name = f"move_{name}"
>       actual = getattr(rolling_obj, name)()

#x1B[1m#x1B[31mD:\a\xarray\xarray\xarray\tests\test_rolling.py#x1B[0m:124: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
#x1B[1m#x1B[31mD:\a\xarray\xarray\xarray\core\rolling.py#x1B[0m:177: in method
    return self._array_reduce(
#x1B[1m#x1B[31mD:\a\xarray\xarray\xarray\core\rolling.py#x1B[0m:693: in _array_reduce
    return self.reduce(array_agg_func, keep_attrs=keep_attrs, **kwargs)
#x1B[1m#x1B[31mD:\a\xarray\xarray\xarray\core\rolling.py#x1B[0m:499: in reduce
    windows = self._construct(
#x1B[1m#x1B[31mD:\a\xarray\xarray\xarray\core\rolling.py#x1B[0m:414: in _construct
    window = obj.variable.rolling_window(
#x1B[1m#x1B[31mD:\a\xarray\xarray\xarray\core\variable.py#x1B[0m:2072: in rolling_window
    var = duck_array_ops.astype(self, dtype, copy=False)
#x1B[1m#x1B[31mD:\a\xarray\xarray\xarray\core\duck_array_ops.py#x1B[0m:210: in astype
    xp = get_array_namespace(data)
#x1B[1m#x1B[31mD:\a\xarray\xarray\xarray\core\duck_array_ops.py#x1B[0m:65: in get_array_namespace
    namespaces = {_get_array_namespace(t) for t in values}
#x1B[1m#x1B[31mD:\a\xarray\xarray\xarray\core\duck_array_ops.py#x1B[0m:65: in <setcomp>
    namespaces = {_get_array_namespace(t) for t in values}
#x1B[1m#x1B[31mD:\a\xarray\xarray\xarray\core\duck_array_ops.py#x1B[0m:61: in _get_array_namespace
    return x.__array_namespace__()
#x1B[1m#x1B[31mD:\a\xarray\xarray\xarray\namedarray\core.py#x1B[0m:462: in __array_namespace__
    import xarray.namedarray._array_api as array_api
#x1B[1m#x1B[31mD:\a\xarray\xarray\xarray\namedarray\_array_api\__init__.py#x1B[0m:71: in <module>
    from xarray.namedarray._array_api._dtypes import (
#x1B[1m#x1B[31mD:\a\xarray\xarray\xarray\namedarray\_array_api\_dtypes.py#x1B[0m:18: in <module>
    bool = _xp.bool
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

attr = 'bool'

    def __getattr__(attr):
        # Warn for expired attributes, and return a dummy function
        # that always raises an exception.
        import warnings
        import math
        try:
            msg = __expired_functions__[attr]
        except KeyError:
            pass
        else:
            warnings.warn(msg, DeprecationWarning, stacklevel=2)
    
            def _expired(*args, **kwds):
                raise RuntimeError(msg)
    
            return _expired
    
        # Emit warnings for deprecated attributes
        try:
            val, msg = __deprecated_attrs__[attr]
        except KeyError:
            pass
        else:
            warnings.warn(msg, DeprecationWarning, stacklevel=2)
            return val
    
        if attr in __future_scalars__:
            # And future warnings for those that will change, but also give
            # the AttributeError
>           warnings.warn(
                f"In the future `np.{attr}` will be defined as the "
                "corresponding NumPy scalar.", FutureWarning, stacklevel=2)
#x1B[1m#x1B[31mE           FutureWarning: In the future `np.bool` will be defined as the corresponding NumPy scalar.#x1B[0m

#x1B[1m#x1B[31mC:\Users\runneradmin\micromamba\envs\xarray-tests\lib\site-packages\numpy\__init__.py#x1B[0m:319: FutureWarning

Check warning on line 0 in xarray.tests.test_rolling.TestDataArrayRolling

See this annotation in the file changed.

@github-actions github-actions / Test Results

3 out of 9 runs failed: test_rolling_wrapped_bottleneck[1-numbagg-numpy-None-False-std] (xarray.tests.test_rolling.TestDataArrayRolling)

artifacts/Test results for Linux-3.10 min-all-deps/pytest.xml [took 0s]
artifacts/Test results for Windows-3.10/pytest.xml [took 0s]
artifacts/Test results for Windows-3.12/pytest.xml [took 0s]
Raw output
FutureWarning: In the future `np.bool` will be defined as the corresponding NumPy scalar.
self = <xarray.tests.test_rolling.TestDataArrayRolling object at 0x000001D945A702E0>
da = <xarray.DataArray (a: 3, time: 21, x: 4)> Size: 2kB
array([[[0.5488135 , 0.71518937, 0.60276338, 0.54488318],
        ...ates:
  * time     (time) datetime64[ns] 168B 2000-01-01 2000-01-02 ... 2000-01-21
Dimensions without coordinates: a, x
name = 'std', center = False, min_periods = None, compute_backend = 'numbagg'

    @pytest.mark.parametrize(
        "name", ("sum", "mean", "std", "min", "max", "median", "argmin", "argmax")
    )
    @pytest.mark.parametrize("center", (True, False, None))
    @pytest.mark.parametrize("min_periods", (1, None))
    @pytest.mark.parametrize("backend", ["numpy"], indirect=True)
    def test_rolling_wrapped_bottleneck(
        self, da, name, center, min_periods, compute_backend
    ) -> None:
        bn = pytest.importorskip("bottleneck", minversion="1.1")
        # Test all bottleneck functions
        rolling_obj = da.rolling(time=7, min_periods=min_periods)
    
        func_name = f"move_{name}"
>       actual = getattr(rolling_obj, name)()

#x1B[1m#x1B[31mD:\a\xarray\xarray\xarray\tests\test_rolling.py#x1B[0m:124: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
#x1B[1m#x1B[31mD:\a\xarray\xarray\xarray\core\rolling.py#x1B[0m:177: in method
    return self._array_reduce(
#x1B[1m#x1B[31mD:\a\xarray\xarray\xarray\core\rolling.py#x1B[0m:693: in _array_reduce
    return self.reduce(array_agg_func, keep_attrs=keep_attrs, **kwargs)
#x1B[1m#x1B[31mD:\a\xarray\xarray\xarray\core\rolling.py#x1B[0m:499: in reduce
    windows = self._construct(
#x1B[1m#x1B[31mD:\a\xarray\xarray\xarray\core\rolling.py#x1B[0m:414: in _construct
    window = obj.variable.rolling_window(
#x1B[1m#x1B[31mD:\a\xarray\xarray\xarray\core\variable.py#x1B[0m:2072: in rolling_window
    var = duck_array_ops.astype(self, dtype, copy=False)
#x1B[1m#x1B[31mD:\a\xarray\xarray\xarray\core\duck_array_ops.py#x1B[0m:210: in astype
    xp = get_array_namespace(data)
#x1B[1m#x1B[31mD:\a\xarray\xarray\xarray\core\duck_array_ops.py#x1B[0m:65: in get_array_namespace
    namespaces = {_get_array_namespace(t) for t in values}
#x1B[1m#x1B[31mD:\a\xarray\xarray\xarray\core\duck_array_ops.py#x1B[0m:65: in <setcomp>
    namespaces = {_get_array_namespace(t) for t in values}
#x1B[1m#x1B[31mD:\a\xarray\xarray\xarray\core\duck_array_ops.py#x1B[0m:61: in _get_array_namespace
    return x.__array_namespace__()
#x1B[1m#x1B[31mD:\a\xarray\xarray\xarray\namedarray\core.py#x1B[0m:462: in __array_namespace__
    import xarray.namedarray._array_api as array_api
#x1B[1m#x1B[31mD:\a\xarray\xarray\xarray\namedarray\_array_api\__init__.py#x1B[0m:71: in <module>
    from xarray.namedarray._array_api._dtypes import (
#x1B[1m#x1B[31mD:\a\xarray\xarray\xarray\namedarray\_array_api\_dtypes.py#x1B[0m:18: in <module>
    bool = _xp.bool
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

attr = 'bool'

    def __getattr__(attr):
        # Warn for expired attributes, and return a dummy function
        # that always raises an exception.
        import warnings
        import math
        try:
            msg = __expired_functions__[attr]
        except KeyError:
            pass
        else:
            warnings.warn(msg, DeprecationWarning, stacklevel=2)
    
            def _expired(*args, **kwds):
                raise RuntimeError(msg)
    
            return _expired
    
        # Emit warnings for deprecated attributes
        try:
            val, msg = __deprecated_attrs__[attr]
        except KeyError:
            pass
        else:
            warnings.warn(msg, DeprecationWarning, stacklevel=2)
            return val
    
        if attr in __future_scalars__:
            # And future warnings for those that will change, but also give
            # the AttributeError
>           warnings.warn(
                f"In the future `np.{attr}` will be defined as the "
                "corresponding NumPy scalar.", FutureWarning, stacklevel=2)
#x1B[1m#x1B[31mE           FutureWarning: In the future `np.bool` will be defined as the corresponding NumPy scalar.#x1B[0m

#x1B[1m#x1B[31mC:\Users\runneradmin\micromamba\envs\xarray-tests\lib\site-packages\numpy\__init__.py#x1B[0m:319: FutureWarning

Check warning on line 0 in xarray.tests.test_rolling.TestDataArrayRolling

See this annotation in the file changed.

@github-actions github-actions / Test Results

3 out of 9 runs failed: test_rolling_wrapped_bottleneck[1-numbagg-numpy-None-False-median] (xarray.tests.test_rolling.TestDataArrayRolling)

artifacts/Test results for Linux-3.10 min-all-deps/pytest.xml [took 0s]
artifacts/Test results for Windows-3.10/pytest.xml [took 0s]
artifacts/Test results for Windows-3.12/pytest.xml [took 0s]
Raw output
FutureWarning: In the future `np.bool` will be defined as the corresponding NumPy scalar.
self = <xarray.tests.test_rolling.TestDataArrayRolling object at 0x000001D945A70730>
da = <xarray.DataArray (a: 3, time: 21, x: 4)> Size: 2kB
array([[[0.5488135 , 0.71518937, 0.60276338, 0.54488318],
        ...ates:
  * time     (time) datetime64[ns] 168B 2000-01-01 2000-01-02 ... 2000-01-21
Dimensions without coordinates: a, x
name = 'median', center = False, min_periods = None, compute_backend = 'numbagg'

    @pytest.mark.parametrize(
        "name", ("sum", "mean", "std", "min", "max", "median", "argmin", "argmax")
    )
    @pytest.mark.parametrize("center", (True, False, None))
    @pytest.mark.parametrize("min_periods", (1, None))
    @pytest.mark.parametrize("backend", ["numpy"], indirect=True)
    def test_rolling_wrapped_bottleneck(
        self, da, name, center, min_periods, compute_backend
    ) -> None:
        bn = pytest.importorskip("bottleneck", minversion="1.1")
        # Test all bottleneck functions
        rolling_obj = da.rolling(time=7, min_periods=min_periods)
    
        func_name = f"move_{name}"
>       actual = getattr(rolling_obj, name)()

#x1B[1m#x1B[31mD:\a\xarray\xarray\xarray\tests\test_rolling.py#x1B[0m:124: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
#x1B[1m#x1B[31mD:\a\xarray\xarray\xarray\core\rolling.py#x1B[0m:177: in method
    return self._array_reduce(
#x1B[1m#x1B[31mD:\a\xarray\xarray\xarray\core\rolling.py#x1B[0m:693: in _array_reduce
    return self.reduce(array_agg_func, keep_attrs=keep_attrs, **kwargs)
#x1B[1m#x1B[31mD:\a\xarray\xarray\xarray\core\rolling.py#x1B[0m:499: in reduce
    windows = self._construct(
#x1B[1m#x1B[31mD:\a\xarray\xarray\xarray\core\rolling.py#x1B[0m:414: in _construct
    window = obj.variable.rolling_window(
#x1B[1m#x1B[31mD:\a\xarray\xarray\xarray\core\variable.py#x1B[0m:2072: in rolling_window
    var = duck_array_ops.astype(self, dtype, copy=False)
#x1B[1m#x1B[31mD:\a\xarray\xarray\xarray\core\duck_array_ops.py#x1B[0m:210: in astype
    xp = get_array_namespace(data)
#x1B[1m#x1B[31mD:\a\xarray\xarray\xarray\core\duck_array_ops.py#x1B[0m:65: in get_array_namespace
    namespaces = {_get_array_namespace(t) for t in values}
#x1B[1m#x1B[31mD:\a\xarray\xarray\xarray\core\duck_array_ops.py#x1B[0m:65: in <setcomp>
    namespaces = {_get_array_namespace(t) for t in values}
#x1B[1m#x1B[31mD:\a\xarray\xarray\xarray\core\duck_array_ops.py#x1B[0m:61: in _get_array_namespace
    return x.__array_namespace__()
#x1B[1m#x1B[31mD:\a\xarray\xarray\xarray\namedarray\core.py#x1B[0m:462: in __array_namespace__
    import xarray.namedarray._array_api as array_api
#x1B[1m#x1B[31mD:\a\xarray\xarray\xarray\namedarray\_array_api\__init__.py#x1B[0m:71: in <module>
    from xarray.namedarray._array_api._dtypes import (
#x1B[1m#x1B[31mD:\a\xarray\xarray\xarray\namedarray\_array_api\_dtypes.py#x1B[0m:18: in <module>
    bool = _xp.bool
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

attr = 'bool'

    def __getattr__(attr):
        # Warn for expired attributes, and return a dummy function
        # that always raises an exception.
        import warnings
        import math
        try:
            msg = __expired_functions__[attr]
        except KeyError:
            pass
        else:
            warnings.warn(msg, DeprecationWarning, stacklevel=2)
    
            def _expired(*args, **kwds):
                raise RuntimeError(msg)
    
            return _expired
    
        # Emit warnings for deprecated attributes
        try:
            val, msg = __deprecated_attrs__[attr]
        except KeyError:
            pass
        else:
            warnings.warn(msg, DeprecationWarning, stacklevel=2)
            return val
    
        if attr in __future_scalars__:
            # And future warnings for those that will change, but also give
            # the AttributeError
>           warnings.warn(
                f"In the future `np.{attr}` will be defined as the "
                "corresponding NumPy scalar.", FutureWarning, stacklevel=2)
#x1B[1m#x1B[31mE           FutureWarning: In the future `np.bool` will be defined as the corresponding NumPy scalar.#x1B[0m

#x1B[1m#x1B[31mC:\Users\runneradmin\micromamba\envs\xarray-tests\lib\site-packages\numpy\__init__.py#x1B[0m:319: FutureWarning

Check warning on line 0 in xarray.tests.test_rolling.TestDataArrayRolling

See this annotation in the file changed.

@github-actions github-actions / Test Results

3 out of 9 runs failed: test_rolling_wrapped_bottleneck[1-numbagg-numpy-None-None-std] (xarray.tests.test_rolling.TestDataArrayRolling)

artifacts/Test results for Linux-3.10 min-all-deps/pytest.xml [took 0s]
artifacts/Test results for Windows-3.10/pytest.xml [took 0s]
artifacts/Test results for Windows-3.12/pytest.xml [took 0s]
Raw output
FutureWarning: In the future `np.bool` will be defined as the corresponding NumPy scalar.
self = <xarray.tests.test_rolling.TestDataArrayRolling object at 0x000001D945A705E0>
da = <xarray.DataArray (a: 3, time: 21, x: 4)> Size: 2kB
array([[[0.5488135 , 0.71518937, 0.60276338, 0.54488318],
        ...ates:
  * time     (time) datetime64[ns] 168B 2000-01-01 2000-01-02 ... 2000-01-21
Dimensions without coordinates: a, x
name = 'std', center = None, min_periods = None, compute_backend = 'numbagg'

    @pytest.mark.parametrize(
        "name", ("sum", "mean", "std", "min", "max", "median", "argmin", "argmax")
    )
    @pytest.mark.parametrize("center", (True, False, None))
    @pytest.mark.parametrize("min_periods", (1, None))
    @pytest.mark.parametrize("backend", ["numpy"], indirect=True)
    def test_rolling_wrapped_bottleneck(
        self, da, name, center, min_periods, compute_backend
    ) -> None:
        bn = pytest.importorskip("bottleneck", minversion="1.1")
        # Test all bottleneck functions
        rolling_obj = da.rolling(time=7, min_periods=min_periods)
    
        func_name = f"move_{name}"
>       actual = getattr(rolling_obj, name)()

#x1B[1m#x1B[31mD:\a\xarray\xarray\xarray\tests\test_rolling.py#x1B[0m:124: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
#x1B[1m#x1B[31mD:\a\xarray\xarray\xarray\core\rolling.py#x1B[0m:177: in method
    return self._array_reduce(
#x1B[1m#x1B[31mD:\a\xarray\xarray\xarray\core\rolling.py#x1B[0m:693: in _array_reduce
    return self.reduce(array_agg_func, keep_attrs=keep_attrs, **kwargs)
#x1B[1m#x1B[31mD:\a\xarray\xarray\xarray\core\rolling.py#x1B[0m:499: in reduce
    windows = self._construct(
#x1B[1m#x1B[31mD:\a\xarray\xarray\xarray\core\rolling.py#x1B[0m:414: in _construct
    window = obj.variable.rolling_window(
#x1B[1m#x1B[31mD:\a\xarray\xarray\xarray\core\variable.py#x1B[0m:2072: in rolling_window
    var = duck_array_ops.astype(self, dtype, copy=False)
#x1B[1m#x1B[31mD:\a\xarray\xarray\xarray\core\duck_array_ops.py#x1B[0m:210: in astype
    xp = get_array_namespace(data)
#x1B[1m#x1B[31mD:\a\xarray\xarray\xarray\core\duck_array_ops.py#x1B[0m:65: in get_array_namespace
    namespaces = {_get_array_namespace(t) for t in values}
#x1B[1m#x1B[31mD:\a\xarray\xarray\xarray\core\duck_array_ops.py#x1B[0m:65: in <setcomp>
    namespaces = {_get_array_namespace(t) for t in values}
#x1B[1m#x1B[31mD:\a\xarray\xarray\xarray\core\duck_array_ops.py#x1B[0m:61: in _get_array_namespace
    return x.__array_namespace__()
#x1B[1m#x1B[31mD:\a\xarray\xarray\xarray\namedarray\core.py#x1B[0m:462: in __array_namespace__
    import xarray.namedarray._array_api as array_api
#x1B[1m#x1B[31mD:\a\xarray\xarray\xarray\namedarray\_array_api\__init__.py#x1B[0m:71: in <module>
    from xarray.namedarray._array_api._dtypes import (
#x1B[1m#x1B[31mD:\a\xarray\xarray\xarray\namedarray\_array_api\_dtypes.py#x1B[0m:18: in <module>
    bool = _xp.bool
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

attr = 'bool'

    def __getattr__(attr):
        # Warn for expired attributes, and return a dummy function
        # that always raises an exception.
        import warnings
        import math
        try:
            msg = __expired_functions__[attr]
        except KeyError:
            pass
        else:
            warnings.warn(msg, DeprecationWarning, stacklevel=2)
    
            def _expired(*args, **kwds):
                raise RuntimeError(msg)
    
            return _expired
    
        # Emit warnings for deprecated attributes
        try:
            val, msg = __deprecated_attrs__[attr]
        except KeyError:
            pass
        else:
            warnings.warn(msg, DeprecationWarning, stacklevel=2)
            return val
    
        if attr in __future_scalars__:
            # And future warnings for those that will change, but also give
            # the AttributeError
>           warnings.warn(
                f"In the future `np.{attr}` will be defined as the "
                "corresponding NumPy scalar.", FutureWarning, stacklevel=2)
#x1B[1m#x1B[31mE           FutureWarning: In the future `np.bool` will be defined as the corresponding NumPy scalar.#x1B[0m

#x1B[1m#x1B[31mC:\Users\runneradmin\micromamba\envs\xarray-tests\lib\site-packages\numpy\__init__.py#x1B[0m:319: FutureWarning

Check warning on line 0 in xarray.tests.test_rolling.TestDataArrayRolling

See this annotation in the file changed.

@github-actions github-actions / Test Results

3 out of 9 runs failed: test_rolling_wrapped_bottleneck[1-numbagg-numpy-None-None-median] (xarray.tests.test_rolling.TestDataArrayRolling)

artifacts/Test results for Linux-3.10 min-all-deps/pytest.xml [took 0s]
artifacts/Test results for Windows-3.10/pytest.xml [took 0s]
artifacts/Test results for Windows-3.12/pytest.xml [took 0s]
Raw output
FutureWarning: In the future `np.bool` will be defined as the corresponding NumPy scalar.
self = <xarray.tests.test_rolling.TestDataArrayRolling object at 0x000001D945A70EE0>
da = <xarray.DataArray (a: 3, time: 21, x: 4)> Size: 2kB
array([[[0.5488135 , 0.71518937, 0.60276338, 0.54488318],
        ...ates:
  * time     (time) datetime64[ns] 168B 2000-01-01 2000-01-02 ... 2000-01-21
Dimensions without coordinates: a, x
name = 'median', center = None, min_periods = None, compute_backend = 'numbagg'

    @pytest.mark.parametrize(
        "name", ("sum", "mean", "std", "min", "max", "median", "argmin", "argmax")
    )
    @pytest.mark.parametrize("center", (True, False, None))
    @pytest.mark.parametrize("min_periods", (1, None))
    @pytest.mark.parametrize("backend", ["numpy"], indirect=True)
    def test_rolling_wrapped_bottleneck(
        self, da, name, center, min_periods, compute_backend
    ) -> None:
        bn = pytest.importorskip("bottleneck", minversion="1.1")
        # Test all bottleneck functions
        rolling_obj = da.rolling(time=7, min_periods=min_periods)
    
        func_name = f"move_{name}"
>       actual = getattr(rolling_obj, name)()

#x1B[1m#x1B[31mD:\a\xarray\xarray\xarray\tests\test_rolling.py#x1B[0m:124: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
#x1B[1m#x1B[31mD:\a\xarray\xarray\xarray\core\rolling.py#x1B[0m:177: in method
    return self._array_reduce(
#x1B[1m#x1B[31mD:\a\xarray\xarray\xarray\core\rolling.py#x1B[0m:693: in _array_reduce
    return self.reduce(array_agg_func, keep_attrs=keep_attrs, **kwargs)
#x1B[1m#x1B[31mD:\a\xarray\xarray\xarray\core\rolling.py#x1B[0m:499: in reduce
    windows = self._construct(
#x1B[1m#x1B[31mD:\a\xarray\xarray\xarray\core\rolling.py#x1B[0m:414: in _construct
    window = obj.variable.rolling_window(
#x1B[1m#x1B[31mD:\a\xarray\xarray\xarray\core\variable.py#x1B[0m:2072: in rolling_window
    var = duck_array_ops.astype(self, dtype, copy=False)
#x1B[1m#x1B[31mD:\a\xarray\xarray\xarray\core\duck_array_ops.py#x1B[0m:210: in astype
    xp = get_array_namespace(data)
#x1B[1m#x1B[31mD:\a\xarray\xarray\xarray\core\duck_array_ops.py#x1B[0m:65: in get_array_namespace
    namespaces = {_get_array_namespace(t) for t in values}
#x1B[1m#x1B[31mD:\a\xarray\xarray\xarray\core\duck_array_ops.py#x1B[0m:65: in <setcomp>
    namespaces = {_get_array_namespace(t) for t in values}
#x1B[1m#x1B[31mD:\a\xarray\xarray\xarray\core\duck_array_ops.py#x1B[0m:61: in _get_array_namespace
    return x.__array_namespace__()
#x1B[1m#x1B[31mD:\a\xarray\xarray\xarray\namedarray\core.py#x1B[0m:462: in __array_namespace__
    import xarray.namedarray._array_api as array_api
#x1B[1m#x1B[31mD:\a\xarray\xarray\xarray\namedarray\_array_api\__init__.py#x1B[0m:71: in <module>
    from xarray.namedarray._array_api._dtypes import (
#x1B[1m#x1B[31mD:\a\xarray\xarray\xarray\namedarray\_array_api\_dtypes.py#x1B[0m:18: in <module>
    bool = _xp.bool
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

attr = 'bool'

    def __getattr__(attr):
        # Warn for expired attributes, and return a dummy function
        # that always raises an exception.
        import warnings
        import math
        try:
            msg = __expired_functions__[attr]
        except KeyError:
            pass
        else:
            warnings.warn(msg, DeprecationWarning, stacklevel=2)
    
            def _expired(*args, **kwds):
                raise RuntimeError(msg)
    
            return _expired
    
        # Emit warnings for deprecated attributes
        try:
            val, msg = __deprecated_attrs__[attr]
        except KeyError:
            pass
        else:
            warnings.warn(msg, DeprecationWarning, stacklevel=2)
            return val
    
        if attr in __future_scalars__:
            # And future warnings for those that will change, but also give
            # the AttributeError
>           warnings.warn(
                f"In the future `np.{attr}` will be defined as the "
                "corresponding NumPy scalar.", FutureWarning, stacklevel=2)
#x1B[1m#x1B[31mE           FutureWarning: In the future `np.bool` will be defined as the corresponding NumPy scalar.#x1B[0m

#x1B[1m#x1B[31mC:\Users\runneradmin\micromamba\envs\xarray-tests\lib\site-packages\numpy\__init__.py#x1B[0m:319: FutureWarning

Check warning on line 0 in xarray.tests.test_rolling.TestDataArrayRolling

See this annotation in the file changed.

@github-actions github-actions / Test Results

3 out of 9 runs failed: test_rolling_wrapped_bottleneck[1-None-numpy-1-True-std] (xarray.tests.test_rolling.TestDataArrayRolling)

artifacts/Test results for Linux-3.10 min-all-deps/pytest.xml [took 0s]
artifacts/Test results for Windows-3.10/pytest.xml [took 0s]
artifacts/Test results for Windows-3.12/pytest.xml [took 0s]
Raw output
FutureWarning: In the future `np.bool` will be defined as the corresponding NumPy scalar.
self = <xarray.tests.test_rolling.TestDataArrayRolling object at 0x000001D945A73430>
da = <xarray.DataArray (a: 3, time: 21, x: 4)> Size: 2kB
array([[[0.5488135 , 0.71518937, 0.60276338, 0.54488318],
        ...ates:
  * time     (time) datetime64[ns] 168B 2000-01-01 2000-01-02 ... 2000-01-21
Dimensions without coordinates: a, x
name = 'std', center = True, min_periods = 1, compute_backend = None

    @pytest.mark.parametrize(
        "name", ("sum", "mean", "std", "min", "max", "median", "argmin", "argmax")
    )
    @pytest.mark.parametrize("center", (True, False, None))
    @pytest.mark.parametrize("min_periods", (1, None))
    @pytest.mark.parametrize("backend", ["numpy"], indirect=True)
    def test_rolling_wrapped_bottleneck(
        self, da, name, center, min_periods, compute_backend
    ) -> None:
        bn = pytest.importorskip("bottleneck", minversion="1.1")
        # Test all bottleneck functions
        rolling_obj = da.rolling(time=7, min_periods=min_periods)
    
        func_name = f"move_{name}"
>       actual = getattr(rolling_obj, name)()

#x1B[1m#x1B[31mD:\a\xarray\xarray\xarray\tests\test_rolling.py#x1B[0m:124: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
#x1B[1m#x1B[31mD:\a\xarray\xarray\xarray\core\rolling.py#x1B[0m:177: in method
    return self._array_reduce(
#x1B[1m#x1B[31mD:\a\xarray\xarray\xarray\core\rolling.py#x1B[0m:693: in _array_reduce
    return self.reduce(array_agg_func, keep_attrs=keep_attrs, **kwargs)
#x1B[1m#x1B[31mD:\a\xarray\xarray\xarray\core\rolling.py#x1B[0m:499: in reduce
    windows = self._construct(
#x1B[1m#x1B[31mD:\a\xarray\xarray\xarray\core\rolling.py#x1B[0m:414: in _construct
    window = obj.variable.rolling_window(
#x1B[1m#x1B[31mD:\a\xarray\xarray\xarray\core\variable.py#x1B[0m:2072: in rolling_window
    var = duck_array_ops.astype(self, dtype, copy=False)
#x1B[1m#x1B[31mD:\a\xarray\xarray\xarray\core\duck_array_ops.py#x1B[0m:210: in astype
    xp = get_array_namespace(data)
#x1B[1m#x1B[31mD:\a\xarray\xarray\xarray\core\duck_array_ops.py#x1B[0m:65: in get_array_namespace
    namespaces = {_get_array_namespace(t) for t in values}
#x1B[1m#x1B[31mD:\a\xarray\xarray\xarray\core\duck_array_ops.py#x1B[0m:65: in <setcomp>
    namespaces = {_get_array_namespace(t) for t in values}
#x1B[1m#x1B[31mD:\a\xarray\xarray\xarray\core\duck_array_ops.py#x1B[0m:61: in _get_array_namespace
    return x.__array_namespace__()
#x1B[1m#x1B[31mD:\a\xarray\xarray\xarray\namedarray\core.py#x1B[0m:462: in __array_namespace__
    import xarray.namedarray._array_api as array_api
#x1B[1m#x1B[31mD:\a\xarray\xarray\xarray\namedarray\_array_api\__init__.py#x1B[0m:71: in <module>
    from xarray.namedarray._array_api._dtypes import (
#x1B[1m#x1B[31mD:\a\xarray\xarray\xarray\namedarray\_array_api\_dtypes.py#x1B[0m:18: in <module>
    bool = _xp.bool
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

attr = 'bool'

    def __getattr__(attr):
        # Warn for expired attributes, and return a dummy function
        # that always raises an exception.
        import warnings
        import math
        try:
            msg = __expired_functions__[attr]
        except KeyError:
            pass
        else:
            warnings.warn(msg, DeprecationWarning, stacklevel=2)
    
            def _expired(*args, **kwds):
                raise RuntimeError(msg)
    
            return _expired
    
        # Emit warnings for deprecated attributes
        try:
            val, msg = __deprecated_attrs__[attr]
        except KeyError:
            pass
        else:
            warnings.warn(msg, DeprecationWarning, stacklevel=2)
            return val
    
        if attr in __future_scalars__:
            # And future warnings for those that will change, but also give
            # the AttributeError
>           warnings.warn(
                f"In the future `np.{attr}` will be defined as the "
                "corresponding NumPy scalar.", FutureWarning, stacklevel=2)
#x1B[1m#x1B[31mE           FutureWarning: In the future `np.bool` will be defined as the corresponding NumPy scalar.#x1B[0m

#x1B[1m#x1B[31mC:\Users\runneradmin\micromamba\envs\xarray-tests\lib\site-packages\numpy\__init__.py#x1B[0m:319: FutureWarning

Check warning on line 0 in xarray.tests.test_rolling.TestDataArrayRolling

See this annotation in the file changed.

@github-actions github-actions / Test Results

3 out of 9 runs failed: test_rolling_wrapped_bottleneck[1-None-numpy-1-True-median] (xarray.tests.test_rolling.TestDataArrayRolling)

artifacts/Test results for Linux-3.10 min-all-deps/pytest.xml [took 0s]
artifacts/Test results for Windows-3.10/pytest.xml [took 0s]
artifacts/Test results for Windows-3.12/pytest.xml [took 0s]
Raw output
FutureWarning: In the future `np.bool` will be defined as the corresponding NumPy scalar.
self = <xarray.tests.test_rolling.TestDataArrayRolling object at 0x000001D945A73670>
da = <xarray.DataArray (a: 3, time: 21, x: 4)> Size: 2kB
array([[[0.5488135 , 0.71518937, 0.60276338, 0.54488318],
        ...ates:
  * time     (time) datetime64[ns] 168B 2000-01-01 2000-01-02 ... 2000-01-21
Dimensions without coordinates: a, x
name = 'median', center = True, min_periods = 1, compute_backend = None

    @pytest.mark.parametrize(
        "name", ("sum", "mean", "std", "min", "max", "median", "argmin", "argmax")
    )
    @pytest.mark.parametrize("center", (True, False, None))
    @pytest.mark.parametrize("min_periods", (1, None))
    @pytest.mark.parametrize("backend", ["numpy"], indirect=True)
    def test_rolling_wrapped_bottleneck(
        self, da, name, center, min_periods, compute_backend
    ) -> None:
        bn = pytest.importorskip("bottleneck", minversion="1.1")
        # Test all bottleneck functions
        rolling_obj = da.rolling(time=7, min_periods=min_periods)
    
        func_name = f"move_{name}"
>       actual = getattr(rolling_obj, name)()

#x1B[1m#x1B[31mD:\a\xarray\xarray\xarray\tests\test_rolling.py#x1B[0m:124: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
#x1B[1m#x1B[31mD:\a\xarray\xarray\xarray\core\rolling.py#x1B[0m:177: in method
    return self._array_reduce(
#x1B[1m#x1B[31mD:\a\xarray\xarray\xarray\core\rolling.py#x1B[0m:693: in _array_reduce
    return self.reduce(array_agg_func, keep_attrs=keep_attrs, **kwargs)
#x1B[1m#x1B[31mD:\a\xarray\xarray\xarray\core\rolling.py#x1B[0m:499: in reduce
    windows = self._construct(
#x1B[1m#x1B[31mD:\a\xarray\xarray\xarray\core\rolling.py#x1B[0m:414: in _construct
    window = obj.variable.rolling_window(
#x1B[1m#x1B[31mD:\a\xarray\xarray\xarray\core\variable.py#x1B[0m:2072: in rolling_window
    var = duck_array_ops.astype(self, dtype, copy=False)
#x1B[1m#x1B[31mD:\a\xarray\xarray\xarray\core\duck_array_ops.py#x1B[0m:210: in astype
    xp = get_array_namespace(data)
#x1B[1m#x1B[31mD:\a\xarray\xarray\xarray\core\duck_array_ops.py#x1B[0m:65: in get_array_namespace
    namespaces = {_get_array_namespace(t) for t in values}
#x1B[1m#x1B[31mD:\a\xarray\xarray\xarray\core\duck_array_ops.py#x1B[0m:65: in <setcomp>
    namespaces = {_get_array_namespace(t) for t in values}
#x1B[1m#x1B[31mD:\a\xarray\xarray\xarray\core\duck_array_ops.py#x1B[0m:61: in _get_array_namespace
    return x.__array_namespace__()
#x1B[1m#x1B[31mD:\a\xarray\xarray\xarray\namedarray\core.py#x1B[0m:462: in __array_namespace__
    import xarray.namedarray._array_api as array_api
#x1B[1m#x1B[31mD:\a\xarray\xarray\xarray\namedarray\_array_api\__init__.py#x1B[0m:71: in <module>
    from xarray.namedarray._array_api._dtypes import (
#x1B[1m#x1B[31mD:\a\xarray\xarray\xarray\namedarray\_array_api\_dtypes.py#x1B[0m:18: in <module>
    bool = _xp.bool
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

attr = 'bool'

    def __getattr__(attr):
        # Warn for expired attributes, and return a dummy function
        # that always raises an exception.
        import warnings
        import math
        try:
            msg = __expired_functions__[attr]
        except KeyError:
            pass
        else:
            warnings.warn(msg, DeprecationWarning, stacklevel=2)
    
            def _expired(*args, **kwds):
                raise RuntimeError(msg)
    
            return _expired
    
        # Emit warnings for deprecated attributes
        try:
            val, msg = __deprecated_attrs__[attr]
        except KeyError:
            pass
        else:
            warnings.warn(msg, DeprecationWarning, stacklevel=2)
            return val
    
        if attr in __future_scalars__:
            # And future warnings for those that will change, but also give
            # the AttributeError
>           warnings.warn(
                f"In the future `np.{attr}` will be defined as the "
                "corresponding NumPy scalar.", FutureWarning, stacklevel=2)
#x1B[1m#x1B[31mE           FutureWarning: In the future `np.bool` will be defined as the corresponding NumPy scalar.#x1B[0m

#x1B[1m#x1B[31mC:\Users\runneradmin\micromamba\envs\xarray-tests\lib\site-packages\numpy\__init__.py#x1B[0m:319: FutureWarning

Check warning on line 0 in xarray.tests.test_rolling.TestDataArrayRolling

See this annotation in the file changed.

@github-actions github-actions / Test Results

3 out of 9 runs failed: test_rolling_wrapped_bottleneck[1-None-numpy-1-False-std] (xarray.tests.test_rolling.TestDataArrayRolling)

artifacts/Test results for Linux-3.10 min-all-deps/pytest.xml [took 0s]
artifacts/Test results for Windows-3.10/pytest.xml [took 0s]
artifacts/Test results for Windows-3.12/pytest.xml [took 0s]
Raw output
FutureWarning: In the future `np.bool` will be defined as the corresponding NumPy scalar.
self = <xarray.tests.test_rolling.TestDataArrayRolling object at 0x000001D945A73A30>
da = <xarray.DataArray (a: 3, time: 21, x: 4)> Size: 2kB
array([[[0.5488135 , 0.71518937, 0.60276338, 0.54488318],
        ...ates:
  * time     (time) datetime64[ns] 168B 2000-01-01 2000-01-02 ... 2000-01-21
Dimensions without coordinates: a, x
name = 'std', center = False, min_periods = 1, compute_backend = None

    @pytest.mark.parametrize(
        "name", ("sum", "mean", "std", "min", "max", "median", "argmin", "argmax")
    )
    @pytest.mark.parametrize("center", (True, False, None))
    @pytest.mark.parametrize("min_periods", (1, None))
    @pytest.mark.parametrize("backend", ["numpy"], indirect=True)
    def test_rolling_wrapped_bottleneck(
        self, da, name, center, min_periods, compute_backend
    ) -> None:
        bn = pytest.importorskip("bottleneck", minversion="1.1")
        # Test all bottleneck functions
        rolling_obj = da.rolling(time=7, min_periods=min_periods)
    
        func_name = f"move_{name}"
>       actual = getattr(rolling_obj, name)()

#x1B[1m#x1B[31mD:\a\xarray\xarray\xarray\tests\test_rolling.py#x1B[0m:124: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
#x1B[1m#x1B[31mD:\a\xarray\xarray\xarray\core\rolling.py#x1B[0m:177: in method
    return self._array_reduce(
#x1B[1m#x1B[31mD:\a\xarray\xarray\xarray\core\rolling.py#x1B[0m:693: in _array_reduce
    return self.reduce(array_agg_func, keep_attrs=keep_attrs, **kwargs)
#x1B[1m#x1B[31mD:\a\xarray\xarray\xarray\core\rolling.py#x1B[0m:499: in reduce
    windows = self._construct(
#x1B[1m#x1B[31mD:\a\xarray\xarray\xarray\core\rolling.py#x1B[0m:414: in _construct
    window = obj.variable.rolling_window(
#x1B[1m#x1B[31mD:\a\xarray\xarray\xarray\core\variable.py#x1B[0m:2072: in rolling_window
    var = duck_array_ops.astype(self, dtype, copy=False)
#x1B[1m#x1B[31mD:\a\xarray\xarray\xarray\core\duck_array_ops.py#x1B[0m:210: in astype
    xp = get_array_namespace(data)
#x1B[1m#x1B[31mD:\a\xarray\xarray\xarray\core\duck_array_ops.py#x1B[0m:65: in get_array_namespace
    namespaces = {_get_array_namespace(t) for t in values}
#x1B[1m#x1B[31mD:\a\xarray\xarray\xarray\core\duck_array_ops.py#x1B[0m:65: in <setcomp>
    namespaces = {_get_array_namespace(t) for t in values}
#x1B[1m#x1B[31mD:\a\xarray\xarray\xarray\core\duck_array_ops.py#x1B[0m:61: in _get_array_namespace
    return x.__array_namespace__()
#x1B[1m#x1B[31mD:\a\xarray\xarray\xarray\namedarray\core.py#x1B[0m:462: in __array_namespace__
    import xarray.namedarray._array_api as array_api
#x1B[1m#x1B[31mD:\a\xarray\xarray\xarray\namedarray\_array_api\__init__.py#x1B[0m:71: in <module>
    from xarray.namedarray._array_api._dtypes import (
#x1B[1m#x1B[31mD:\a\xarray\xarray\xarray\namedarray\_array_api\_dtypes.py#x1B[0m:18: in <module>
    bool = _xp.bool
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

attr = 'bool'

    def __getattr__(attr):
        # Warn for expired attributes, and return a dummy function
        # that always raises an exception.
        import warnings
        import math
        try:
            msg = __expired_functions__[attr]
        except KeyError:
            pass
        else:
            warnings.warn(msg, DeprecationWarning, stacklevel=2)
    
            def _expired(*args, **kwds):
                raise RuntimeError(msg)
    
            return _expired
    
        # Emit warnings for deprecated attributes
        try:
            val, msg = __deprecated_attrs__[attr]
        except KeyError:
            pass
        else:
            warnings.warn(msg, DeprecationWarning, stacklevel=2)
            return val
    
        if attr in __future_scalars__:
            # And future warnings for those that will change, but also give
            # the AttributeError
>           warnings.warn(
                f"In the future `np.{attr}` will be defined as the "
                "corresponding NumPy scalar.", FutureWarning, stacklevel=2)
#x1B[1m#x1B[31mE           FutureWarning: In the future `np.bool` will be defined as the corresponding NumPy scalar.#x1B[0m

#x1B[1m#x1B[31mC:\Users\runneradmin\micromamba\envs\xarray-tests\lib\site-packages\numpy\__init__.py#x1B[0m:319: FutureWarning

Check warning on line 0 in xarray.tests.test_rolling.TestDataArrayRolling

See this annotation in the file changed.

@github-actions github-actions / Test Results

3 out of 9 runs failed: test_rolling_wrapped_bottleneck[1-None-numpy-1-False-median] (xarray.tests.test_rolling.TestDataArrayRolling)

artifacts/Test results for Linux-3.10 min-all-deps/pytest.xml [took 0s]
artifacts/Test results for Windows-3.10/pytest.xml [took 0s]
artifacts/Test results for Windows-3.12/pytest.xml [took 0s]
Raw output
FutureWarning: In the future `np.bool` will be defined as the corresponding NumPy scalar.
self = <xarray.tests.test_rolling.TestDataArrayRolling object at 0x000001D945A73C70>
da = <xarray.DataArray (a: 3, time: 21, x: 4)> Size: 2kB
array([[[0.5488135 , 0.71518937, 0.60276338, 0.54488318],
        ...ates:
  * time     (time) datetime64[ns] 168B 2000-01-01 2000-01-02 ... 2000-01-21
Dimensions without coordinates: a, x
name = 'median', center = False, min_periods = 1, compute_backend = None

    @pytest.mark.parametrize(
        "name", ("sum", "mean", "std", "min", "max", "median", "argmin", "argmax")
    )
    @pytest.mark.parametrize("center", (True, False, None))
    @pytest.mark.parametrize("min_periods", (1, None))
    @pytest.mark.parametrize("backend", ["numpy"], indirect=True)
    def test_rolling_wrapped_bottleneck(
        self, da, name, center, min_periods, compute_backend
    ) -> None:
        bn = pytest.importorskip("bottleneck", minversion="1.1")
        # Test all bottleneck functions
        rolling_obj = da.rolling(time=7, min_periods=min_periods)
    
        func_name = f"move_{name}"
>       actual = getattr(rolling_obj, name)()

#x1B[1m#x1B[31mD:\a\xarray\xarray\xarray\tests\test_rolling.py#x1B[0m:124: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
#x1B[1m#x1B[31mD:\a\xarray\xarray\xarray\core\rolling.py#x1B[0m:177: in method
    return self._array_reduce(
#x1B[1m#x1B[31mD:\a\xarray\xarray\xarray\core\rolling.py#x1B[0m:693: in _array_reduce
    return self.reduce(array_agg_func, keep_attrs=keep_attrs, **kwargs)
#x1B[1m#x1B[31mD:\a\xarray\xarray\xarray\core\rolling.py#x1B[0m:499: in reduce
    windows = self._construct(
#x1B[1m#x1B[31mD:\a\xarray\xarray\xarray\core\rolling.py#x1B[0m:414: in _construct
    window = obj.variable.rolling_window(
#x1B[1m#x1B[31mD:\a\xarray\xarray\xarray\core\variable.py#x1B[0m:2072: in rolling_window
    var = duck_array_ops.astype(self, dtype, copy=False)
#x1B[1m#x1B[31mD:\a\xarray\xarray\xarray\core\duck_array_ops.py#x1B[0m:210: in astype
    xp = get_array_namespace(data)
#x1B[1m#x1B[31mD:\a\xarray\xarray\xarray\core\duck_array_ops.py#x1B[0m:65: in get_array_namespace
    namespaces = {_get_array_namespace(t) for t in values}
#x1B[1m#x1B[31mD:\a\xarray\xarray\xarray\core\duck_array_ops.py#x1B[0m:65: in <setcomp>
    namespaces = {_get_array_namespace(t) for t in values}
#x1B[1m#x1B[31mD:\a\xarray\xarray\xarray\core\duck_array_ops.py#x1B[0m:61: in _get_array_namespace
    return x.__array_namespace__()
#x1B[1m#x1B[31mD:\a\xarray\xarray\xarray\namedarray\core.py#x1B[0m:462: in __array_namespace__
    import xarray.namedarray._array_api as array_api
#x1B[1m#x1B[31mD:\a\xarray\xarray\xarray\namedarray\_array_api\__init__.py#x1B[0m:71: in <module>
    from xarray.namedarray._array_api._dtypes import (
#x1B[1m#x1B[31mD:\a\xarray\xarray\xarray\namedarray\_array_api\_dtypes.py#x1B[0m:18: in <module>
    bool = _xp.bool
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

attr = 'bool'

    def __getattr__(attr):
        # Warn for expired attributes, and return a dummy function
        # that always raises an exception.
        import warnings
        import math
        try:
            msg = __expired_functions__[attr]
        except KeyError:
            pass
        else:
            warnings.warn(msg, DeprecationWarning, stacklevel=2)
    
            def _expired(*args, **kwds):
                raise RuntimeError(msg)
    
            return _expired
    
        # Emit warnings for deprecated attributes
        try:
            val, msg = __deprecated_attrs__[attr]
        except KeyError:
            pass
        else:
            warnings.warn(msg, DeprecationWarning, stacklevel=2)
            return val
    
        if attr in __future_scalars__:
            # And future warnings for those that will change, but also give
            # the AttributeError
>           warnings.warn(
                f"In the future `np.{attr}` will be defined as the "
                "corresponding NumPy scalar.", FutureWarning, stacklevel=2)
#x1B[1m#x1B[31mE           FutureWarning: In the future `np.bool` will be defined as the corresponding NumPy scalar.#x1B[0m

#x1B[1m#x1B[31mC:\Users\runneradmin\micromamba\envs\xarray-tests\lib\site-packages\numpy\__init__.py#x1B[0m:319: FutureWarning

Check warning on line 0 in xarray.tests.test_rolling.TestDataArrayRolling

See this annotation in the file changed.

@github-actions github-actions / Test Results

3 out of 9 runs failed: test_rolling_wrapped_bottleneck[1-None-numpy-1-None-std] (xarray.tests.test_rolling.TestDataArrayRolling)

artifacts/Test results for Linux-3.10 min-all-deps/pytest.xml [took 0s]
artifacts/Test results for Windows-3.10/pytest.xml [took 0s]
artifacts/Test results for Windows-3.12/pytest.xml [took 0s]
Raw output
FutureWarning: In the future `np.bool` will be defined as the corresponding NumPy scalar.
self = <xarray.tests.test_rolling.TestDataArrayRolling object at 0x000001D945C08070>
da = <xarray.DataArray (a: 3, time: 21, x: 4)> Size: 2kB
array([[[0.5488135 , 0.71518937, 0.60276338, 0.54488318],
        ...ates:
  * time     (time) datetime64[ns] 168B 2000-01-01 2000-01-02 ... 2000-01-21
Dimensions without coordinates: a, x
name = 'std', center = None, min_periods = 1, compute_backend = None

    @pytest.mark.parametrize(
        "name", ("sum", "mean", "std", "min", "max", "median", "argmin", "argmax")
    )
    @pytest.mark.parametrize("center", (True, False, None))
    @pytest.mark.parametrize("min_periods", (1, None))
    @pytest.mark.parametrize("backend", ["numpy"], indirect=True)
    def test_rolling_wrapped_bottleneck(
        self, da, name, center, min_periods, compute_backend
    ) -> None:
        bn = pytest.importorskip("bottleneck", minversion="1.1")
        # Test all bottleneck functions
        rolling_obj = da.rolling(time=7, min_periods=min_periods)
    
        func_name = f"move_{name}"
>       actual = getattr(rolling_obj, name)()

#x1B[1m#x1B[31mD:\a\xarray\xarray\xarray\tests\test_rolling.py#x1B[0m:124: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
#x1B[1m#x1B[31mD:\a\xarray\xarray\xarray\core\rolling.py#x1B[0m:177: in method
    return self._array_reduce(
#x1B[1m#x1B[31mD:\a\xarray\xarray\xarray\core\rolling.py#x1B[0m:693: in _array_reduce
    return self.reduce(array_agg_func, keep_attrs=keep_attrs, **kwargs)
#x1B[1m#x1B[31mD:\a\xarray\xarray\xarray\core\rolling.py#x1B[0m:499: in reduce
    windows = self._construct(
#x1B[1m#x1B[31mD:\a\xarray\xarray\xarray\core\rolling.py#x1B[0m:414: in _construct
    window = obj.variable.rolling_window(
#x1B[1m#x1B[31mD:\a\xarray\xarray\xarray\core\variable.py#x1B[0m:2072: in rolling_window
    var = duck_array_ops.astype(self, dtype, copy=False)
#x1B[1m#x1B[31mD:\a\xarray\xarray\xarray\core\duck_array_ops.py#x1B[0m:210: in astype
    xp = get_array_namespace(data)
#x1B[1m#x1B[31mD:\a\xarray\xarray\xarray\core\duck_array_ops.py#x1B[0m:65: in get_array_namespace
    namespaces = {_get_array_namespace(t) for t in values}
#x1B[1m#x1B[31mD:\a\xarray\xarray\xarray\core\duck_array_ops.py#x1B[0m:65: in <setcomp>
    namespaces = {_get_array_namespace(t) for t in values}
#x1B[1m#x1B[31mD:\a\xarray\xarray\xarray\core\duck_array_ops.py#x1B[0m:61: in _get_array_namespace
    return x.__array_namespace__()
#x1B[1m#x1B[31mD:\a\xarray\xarray\xarray\namedarray\core.py#x1B[0m:462: in __array_namespace__
    import xarray.namedarray._array_api as array_api
#x1B[1m#x1B[31mD:\a\xarray\xarray\xarray\namedarray\_array_api\__init__.py#x1B[0m:71: in <module>
    from xarray.namedarray._array_api._dtypes import (
#x1B[1m#x1B[31mD:\a\xarray\xarray\xarray\namedarray\_array_api\_dtypes.py#x1B[0m:18: in <module>
    bool = _xp.bool
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

attr = 'bool'

    def __getattr__(attr):
        # Warn for expired attributes, and return a dummy function
        # that always raises an exception.
        import warnings
        import math
        try:
            msg = __expired_functions__[attr]
        except KeyError:
            pass
        else:
            warnings.warn(msg, DeprecationWarning, stacklevel=2)
    
            def _expired(*args, **kwds):
                raise RuntimeError(msg)
    
            return _expired
    
        # Emit warnings for deprecated attributes
        try:
            val, msg = __deprecated_attrs__[attr]
        except KeyError:
            pass
        else:
            warnings.warn(msg, DeprecationWarning, stacklevel=2)
            return val
    
        if attr in __future_scalars__:
            # And future warnings for those that will change, but also give
            # the AttributeError
>           warnings.warn(
                f"In the future `np.{attr}` will be defined as the "
                "corresponding NumPy scalar.", FutureWarning, stacklevel=2)
#x1B[1m#x1B[31mE           FutureWarning: In the future `np.bool` will be defined as the corresponding NumPy scalar.#x1B[0m

#x1B[1m#x1B[31mC:\Users\runneradmin\micromamba\envs\xarray-tests\lib\site-packages\numpy\__init__.py#x1B[0m:319: FutureWarning

Check warning on line 0 in xarray.tests.test_rolling.TestDataArrayRolling

See this annotation in the file changed.

@github-actions github-actions / Test Results

3 out of 9 runs failed: test_rolling_wrapped_bottleneck[1-None-numpy-1-None-median] (xarray.tests.test_rolling.TestDataArrayRolling)

artifacts/Test results for Linux-3.10 min-all-deps/pytest.xml [took 0s]
artifacts/Test results for Windows-3.10/pytest.xml [took 0s]
artifacts/Test results for Windows-3.12/pytest.xml [took 0s]
Raw output
FutureWarning: In the future `np.bool` will be defined as the corresponding NumPy scalar.
self = <xarray.tests.test_rolling.TestDataArrayRolling object at 0x000001D945C082B0>
da = <xarray.DataArray (a: 3, time: 21, x: 4)> Size: 2kB
array([[[0.5488135 , 0.71518937, 0.60276338, 0.54488318],
        ...ates:
  * time     (time) datetime64[ns] 168B 2000-01-01 2000-01-02 ... 2000-01-21
Dimensions without coordinates: a, x
name = 'median', center = None, min_periods = 1, compute_backend = None

    @pytest.mark.parametrize(
        "name", ("sum", "mean", "std", "min", "max", "median", "argmin", "argmax")
    )
    @pytest.mark.parametrize("center", (True, False, None))
    @pytest.mark.parametrize("min_periods", (1, None))
    @pytest.mark.parametrize("backend", ["numpy"], indirect=True)
    def test_rolling_wrapped_bottleneck(
        self, da, name, center, min_periods, compute_backend
    ) -> None:
        bn = pytest.importorskip("bottleneck", minversion="1.1")
        # Test all bottleneck functions
        rolling_obj = da.rolling(time=7, min_periods=min_periods)
    
        func_name = f"move_{name}"
>       actual = getattr(rolling_obj, name)()

#x1B[1m#x1B[31mD:\a\xarray\xarray\xarray\tests\test_rolling.py#x1B[0m:124: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
#x1B[1m#x1B[31mD:\a\xarray\xarray\xarray\core\rolling.py#x1B[0m:177: in method
    return self._array_reduce(
#x1B[1m#x1B[31mD:\a\xarray\xarray\xarray\core\rolling.py#x1B[0m:693: in _array_reduce
    return self.reduce(array_agg_func, keep_attrs=keep_attrs, **kwargs)
#x1B[1m#x1B[31mD:\a\xarray\xarray\xarray\core\rolling.py#x1B[0m:499: in reduce
    windows = self._construct(
#x1B[1m#x1B[31mD:\a\xarray\xarray\xarray\core\rolling.py#x1B[0m:414: in _construct
    window = obj.variable.rolling_window(
#x1B[1m#x1B[31mD:\a\xarray\xarray\xarray\core\variable.py#x1B[0m:2072: in rolling_window
    var = duck_array_ops.astype(self, dtype, copy=False)
#x1B[1m#x1B[31mD:\a\xarray\xarray\xarray\core\duck_array_ops.py#x1B[0m:210: in astype
    xp = get_array_namespace(data)
#x1B[1m#x1B[31mD:\a\xarray\xarray\xarray\core\duck_array_ops.py#x1B[0m:65: in get_array_namespace
    namespaces = {_get_array_namespace(t) for t in values}
#x1B[1m#x1B[31mD:\a\xarray\xarray\xarray\core\duck_array_ops.py#x1B[0m:65: in <setcomp>
    namespaces = {_get_array_namespace(t) for t in values}
#x1B[1m#x1B[31mD:\a\xarray\xarray\xarray\core\duck_array_ops.py#x1B[0m:61: in _get_array_namespace
    return x.__array_namespace__()
#x1B[1m#x1B[31mD:\a\xarray\xarray\xarray\namedarray\core.py#x1B[0m:462: in __array_namespace__
    import xarray.namedarray._array_api as array_api
#x1B[1m#x1B[31mD:\a\xarray\xarray\xarray\namedarray\_array_api\__init__.py#x1B[0m:71: in <module>
    from xarray.namedarray._array_api._dtypes import (
#x1B[1m#x1B[31mD:\a\xarray\xarray\xarray\namedarray\_array_api\_dtypes.py#x1B[0m:18: in <module>
    bool = _xp.bool
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

attr = 'bool'

    def __getattr__(attr):
        # Warn for expired attributes, and return a dummy function
        # that always raises an exception.
        import warnings
        import math
        try:
            msg = __expired_functions__[attr]
        except KeyError:
            pass
        else:
            warnings.warn(msg, DeprecationWarning, stacklevel=2)
    
            def _expired(*args, **kwds):
                raise RuntimeError(msg)
    
            return _expired
    
        # Emit warnings for deprecated attributes
        try:
            val, msg = __deprecated_attrs__[attr]
        except KeyError:
            pass
        else:
            warnings.warn(msg, DeprecationWarning, stacklevel=2)
            return val
    
        if attr in __future_scalars__:
            # And future warnings for those that will change, but also give
            # the AttributeError
>           warnings.warn(
                f"In the future `np.{attr}` will be defined as the "
                "corresponding NumPy scalar.", FutureWarning, stacklevel=2)
#x1B[1m#x1B[31mE           FutureWarning: In the future `np.bool` will be defined as the corresponding NumPy scalar.#x1B[0m

#x1B[1m#x1B[31mC:\Users\runneradmin\micromamba\envs\xarray-tests\lib\site-packages\numpy\__init__.py#x1B[0m:319: FutureWarning

Check warning on line 0 in xarray.tests.test_rolling.TestDataArrayRolling

See this annotation in the file changed.

@github-actions github-actions / Test Results

3 out of 9 runs failed: test_rolling_wrapped_bottleneck[1-None-numpy-None-True-std] (xarray.tests.test_rolling.TestDataArrayRolling)

artifacts/Test results for Linux-3.10 min-all-deps/pytest.xml [took 0s]
artifacts/Test results for Windows-3.10/pytest.xml [took 0s]
artifacts/Test results for Windows-3.12/pytest.xml [took 0s]
Raw output
FutureWarning: In the future `np.bool` will be defined as the corresponding NumPy scalar.
self = <xarray.tests.test_rolling.TestDataArrayRolling object at 0x000001D945C08670>
da = <xarray.DataArray (a: 3, time: 21, x: 4)> Size: 2kB
array([[[0.5488135 , 0.71518937, 0.60276338, 0.54488318],
        ...ates:
  * time     (time) datetime64[ns] 168B 2000-01-01 2000-01-02 ... 2000-01-21
Dimensions without coordinates: a, x
name = 'std', center = True, min_periods = None, compute_backend = None

    @pytest.mark.parametrize(
        "name", ("sum", "mean", "std", "min", "max", "median", "argmin", "argmax")
    )
    @pytest.mark.parametrize("center", (True, False, None))
    @pytest.mark.parametrize("min_periods", (1, None))
    @pytest.mark.parametrize("backend", ["numpy"], indirect=True)
    def test_rolling_wrapped_bottleneck(
        self, da, name, center, min_periods, compute_backend
    ) -> None:
        bn = pytest.importorskip("bottleneck", minversion="1.1")
        # Test all bottleneck functions
        rolling_obj = da.rolling(time=7, min_periods=min_periods)
    
        func_name = f"move_{name}"
>       actual = getattr(rolling_obj, name)()

#x1B[1m#x1B[31mD:\a\xarray\xarray\xarray\tests\test_rolling.py#x1B[0m:124: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
#x1B[1m#x1B[31mD:\a\xarray\xarray\xarray\core\rolling.py#x1B[0m:177: in method
    return self._array_reduce(
#x1B[1m#x1B[31mD:\a\xarray\xarray\xarray\core\rolling.py#x1B[0m:693: in _array_reduce
    return self.reduce(array_agg_func, keep_attrs=keep_attrs, **kwargs)
#x1B[1m#x1B[31mD:\a\xarray\xarray\xarray\core\rolling.py#x1B[0m:499: in reduce
    windows = self._construct(
#x1B[1m#x1B[31mD:\a\xarray\xarray\xarray\core\rolling.py#x1B[0m:414: in _construct
    window = obj.variable.rolling_window(
#x1B[1m#x1B[31mD:\a\xarray\xarray\xarray\core\variable.py#x1B[0m:2072: in rolling_window
    var = duck_array_ops.astype(self, dtype, copy=False)
#x1B[1m#x1B[31mD:\a\xarray\xarray\xarray\core\duck_array_ops.py#x1B[0m:210: in astype
    xp = get_array_namespace(data)
#x1B[1m#x1B[31mD:\a\xarray\xarray\xarray\core\duck_array_ops.py#x1B[0m:65: in get_array_namespace
    namespaces = {_get_array_namespace(t) for t in values}
#x1B[1m#x1B[31mD:\a\xarray\xarray\xarray\core\duck_array_ops.py#x1B[0m:65: in <setcomp>
    namespaces = {_get_array_namespace(t) for t in values}
#x1B[1m#x1B[31mD:\a\xarray\xarray\xarray\core\duck_array_ops.py#x1B[0m:61: in _get_array_namespace
    return x.__array_namespace__()
#x1B[1m#x1B[31mD:\a\xarray\xarray\xarray\namedarray\core.py#x1B[0m:462: in __array_namespace__
    import xarray.namedarray._array_api as array_api
#x1B[1m#x1B[31mD:\a\xarray\xarray\xarray\namedarray\_array_api\__init__.py#x1B[0m:71: in <module>
    from xarray.namedarray._array_api._dtypes import (
#x1B[1m#x1B[31mD:\a\xarray\xarray\xarray\namedarray\_array_api\_dtypes.py#x1B[0m:18: in <module>
    bool = _xp.bool
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

attr = 'bool'

    def __getattr__(attr):
        # Warn for expired attributes, and return a dummy function
        # that always raises an exception.
        import warnings
        import math
        try:
            msg = __expired_functions__[attr]
        except KeyError:
            pass
        else:
            warnings.warn(msg, DeprecationWarning, stacklevel=2)
    
            def _expired(*args, **kwds):
                raise RuntimeError(msg)
    
            return _expired
    
        # Emit warnings for deprecated attributes
        try:
            val, msg = __deprecated_attrs__[attr]
        except KeyError:
            pass
        else:
            warnings.warn(msg, DeprecationWarning, stacklevel=2)
            return val
    
        if attr in __future_scalars__:
            # And future warnings for those that will change, but also give
            # the AttributeError
>           warnings.warn(
                f"In the future `np.{attr}` will be defined as the "
                "corresponding NumPy scalar.", FutureWarning, stacklevel=2)
#x1B[1m#x1B[31mE           FutureWarning: In the future `np.bool` will be defined as the corresponding NumPy scalar.#x1B[0m

#x1B[1m#x1B[31mC:\Users\runneradmin\micromamba\envs\xarray-tests\lib\site-packages\numpy\__init__.py#x1B[0m:319: FutureWarning