Skip to content

Commit

Permalink
Fix failing test
Browse files Browse the repository at this point in the history
  • Loading branch information
hoxbro committed May 22, 2024
1 parent b6877cf commit 3c48b59
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
4 changes: 2 additions & 2 deletions datashader/data_libraries/dask_xarray.py
Original file line number Diff line number Diff line change
Expand Up @@ -173,8 +173,8 @@ def dask_raster(glyph, xr_ds, schema, canvas, summary, *, antialias=False, cuda=
src_y0, src_y1 = glyph._compute_bounds_from_1d_centers(
xr_ds, y_name, maybe_expand=False, orient=False
)
xbinsize = float(xr_ds[x_name][1] - xr_ds[x_name][0])
ybinsize = float(xr_ds[y_name][1] - xr_ds[y_name][0])
xbinsize = abs(float(xr_ds[x_name][1] - xr_ds[x_name][0]))
ybinsize = abs(float(xr_ds[y_name][1] - xr_ds[y_name][0]))

# Compute scale/translate
out_h, out_w = shape
Expand Down
3 changes: 1 addition & 2 deletions datashader/tests/test_quadmesh.py
Original file line number Diff line number Diff line change
Expand Up @@ -188,8 +188,7 @@ def test_raster_quadmesh_upsamplex_and_downsampley(array_module):
assert_eq_xr(res, out)


# FIXME: dask.array does not work for this test
@pytest.mark.parametrize('array_module', [array_modules[0], *array_modules[2:]])
@pytest.mark.parametrize('array_module', array_modules)
def test_raster_quadmesh_autorange_reversed(array_module):
c = ds.Canvas(plot_width=8, plot_height=4)
da = xr.DataArray(
Expand Down

0 comments on commit 3c48b59

Please sign in to comment.