Skip to content

Commit

Permalink
Update shade tests for changes to viridis in mpl 3.2.1 (#891)
Browse files Browse the repository at this point in the history
  • Loading branch information
philippjfr authored Apr 7, 2020
1 parent 49563b0 commit bd93985
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ jobs:
# Install spatialpandas here because it's python 3 only and requires
# conda-forge for some dependencies
- if [[ "$PYTHON_VERSION" != "2.7" ]]; then
conda install -c pyviz/label/dev -c conda-forge spatialpandas;
conda install -c pyviz/label/dev -c conda-forge matplotlib=3.2.1 spatialpandas;
fi
# Install rasterio using pip to avoid conda solver errors
- pip install rasterio
Expand Down
12 changes: 6 additions & 6 deletions datashader/tests/test_transfer_functions.py
Original file line number Diff line number Diff line change
Expand Up @@ -194,9 +194,9 @@ def test_span_cmap_mpl(agg):
cmap = cm.viridis

# Build expected solution Data Array
sol = np.array([[5505348, 4283695428, 4287524142],
[4287143710, 5505348, 4282832267],
[4280213706, 4280608765, 5505348]])
sol = np.array([[0, 4283695428, 4287524142],
[4287143710, 0, 4282832267],
[4280213706, 4280608765, 0]])
sol = tf.Image(sol, coords=coords, dims=dims)

# Check span
Expand Down Expand Up @@ -253,9 +253,9 @@ def test_shade_cmap_errors(agg):
def test_shade_mpl_cmap(agg):
cm = pytest.importorskip('matplotlib.cm')
img = tf.shade(agg.a, how='log', cmap=cm.viridis)
sol = np.array([[5505348, 4283695428, 4287524142],
[4287143710, 5505348, 4282832267],
[4280213706, 4280608765, 5505348]])
sol = np.array([[0, 4283695428, 4287524142],
[4287143710, 0, 4282832267],
[4280213706, 4280608765, 0]])
sol = tf.Image(sol, coords=coords, dims=dims)
assert_eq_xr(img, sol)

Expand Down

0 comments on commit bd93985

Please sign in to comment.