Skip to content

Commit 12a246c

Browse files
committed
add another test
1 parent 77e585b commit 12a246c

File tree

3 files changed

+17
-2
lines changed

3 files changed

+17
-2
lines changed

afile

Whitespace-only changes.

src/dask_histogram/core.py

-2
Original file line numberDiff line numberDiff line change
@@ -410,7 +410,6 @@ def _blocked_multi(
410410
repacker: Callable,
411411
*flattened_inputs: tuple[Any],
412412
) -> bh.Histogram:
413-
414413
data_list, weights, samples, histref = repacker(flattened_inputs)
415414

416415
weights = weights or (None for _ in range(len(data_list)))
@@ -439,7 +438,6 @@ def _blocked_multi_df(
439438
repacker: Callable,
440439
*flattened_inputs: tuple[Any],
441440
) -> bh.Histogram:
442-
443441
data_list, weights, samples, histref = repacker(flattened_inputs)
444442

445443
weights = weights or (None for _ in range(len(data_list)))

tests/test_boost.py

+17
Original file line numberDiff line numberDiff line change
@@ -584,3 +584,20 @@ def test_155_boost_factory():
584584
axes=(axis,),
585585
).compute()
586586
assert np.all(hist.values() == [3.0, 3.0, 3.0, 3.0, 3.0, 3.0, 3.0, 3.0, 3.0, 3.0])
587+
588+
589+
def test_155_2():
590+
import boost_histogram as bh
591+
import dask_awkward as dak
592+
import dask_histogram as dh
593+
594+
arr = dak.from_lists([list(range(10))] * 3)
595+
axis = bh.axis.Regular(10, 0.0, 10.0)
596+
hist = dh.factory(
597+
arr,
598+
axes=(axis,),
599+
weights=arr,
600+
).compute()
601+
assert np.all(
602+
hist.values() == [0.0, 3.0, 6.0, 9.0, 12.0, 15.0, 18.0, 21.0, 24.0, 27.0]
603+
)

0 commit comments

Comments
 (0)