Skip to content

Commit

Permalink
install the dev version of sparse in the upstream-dev CI (pydata#5059)
Browse files Browse the repository at this point in the history
* re-enable sparse [test-upstream]

* remove the comment about adding sparse back in

* silence the failing test for now [test-upstream]
  • Loading branch information
keewis authored Mar 22, 2021
1 parent e6168ed commit fba449b
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
7 changes: 2 additions & 5 deletions ci/install-upstream-wheels.sh
Original file line number Diff line number Diff line change
@@ -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 \
Expand Down Expand Up @@ -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
4 changes: 4 additions & 0 deletions xarray/tests/test_sparse.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit fba449b

Please sign in to comment.