diff --git a/ci/install-upstream-wheels.sh b/ci/install-upstream-wheels.sh index c5a640c5a81..073b28b8cfb 100755 --- a/ci/install-upstream-wheels.sh +++ b/ci/install-upstream-wheels.sh @@ -1,8 +1,5 @@ #!/usr/bin/env bash -# TODO: add sparse back in, once Numba works with the development version of -# NumPy again: https://github.com/pydata/xarray/issues/4146 - conda uninstall -y --force \ numpy \ scipy \ @@ -42,5 +39,5 @@ python -m pip install \ git+https://github.com/Unidata/cftime \ git+https://github.com/mapbox/rasterio \ git+https://github.com/hgrecco/pint \ - git+https://github.com/pydata/bottleneck # \ - # git+https://github.com/pydata/sparse + git+https://github.com/pydata/bottleneck \ + git+https://github.com/pydata/sparse diff --git a/xarray/tests/test_sparse.py b/xarray/tests/test_sparse.py index 49b6a58694e..07d8df7a5a5 100644 --- a/xarray/tests/test_sparse.py +++ b/xarray/tests/test_sparse.py @@ -227,6 +227,10 @@ def test_variable_method(func, sparse_output): ret_s = func(var_s) ret_d = func(var_d) + # TODO: figure out how to verify the results of each method + if isinstance(ret_d, xr.Variable) and isinstance(ret_d.data, sparse.SparseArray): + ret_d = ret_d.copy(data=ret_d.data.todense()) + if sparse_output: assert isinstance(ret_s.data, sparse.SparseArray) assert np.allclose(ret_s.data.todense(), ret_d.data, equal_nan=True)