Skip to content

Commit

Permalink
Add test
Browse files Browse the repository at this point in the history
  • Loading branch information
dcherian committed Sep 16, 2024
1 parent c1b5c1c commit 40efff2
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions tests/test_core.py
Original file line number Diff line number Diff line change
Expand Up @@ -1997,3 +1997,11 @@ def test_agg_dtypes(func, engine):
)
expected = _get_array_func(func)(counts, dtype="uint8")
assert actual.dtype == np.uint8 == expected.dtype


def test_blockwise_avoid_rechunk():
array = dask.array.zeros((6,), chunks=(2, 4), dtype=np.int64)
by = np.array(["1", "1", "0", "", "0", ""], dtype="<U1")
actual, groups = groupby_reduce(array, by, func="first")
assert_equal(groups, ["", "0", "1"])
assert_equal(actual, [0, 0, 0])

0 comments on commit 40efff2

Please sign in to comment.