Skip to content

Commit f80227a

Browse files
committed
Update tests
1 parent a7d5486 commit f80227a

1 file changed

Lines changed: 8 additions & 3 deletions

File tree

holoviews/tests/operation/test_datashader.py

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -512,9 +512,14 @@ def test_rectangles_aggregate_count_cat(self):
512512
[0, 1, 1, 1],
513513
[0, 0, 0, 0]
514514
])
515-
expected1 = Image((xs, ys, arr1), vdims=Dimension('cat Count', nodata=0))
516-
expected2 = Image((xs, ys, arr2), vdims=Dimension('cat Count', nodata=0))
517-
expected = NdOverlay({'A': expected1, 'B': expected2}, kdims=['cat'])
515+
# Create 3D array in (x, y, cat) format
516+
combined = np.stack([arr1.T, arr2.T], axis=2).astype(np.uint32)
517+
xrda = xr.DataArray(
518+
combined,
519+
coords={'x': xs, 'y': ys, 'cat': ['A', 'B']},
520+
dims=['x', 'y', 'cat']
521+
)
522+
expected = ImageStack(xrda, kdims=['x', 'y'], vdims=['A', 'B'])
518523
self.assertEqual(agg, expected)
519524

520525
def test_rectangles_aggregate_sum(self):

0 commit comments

Comments
 (0)