Skip to content

Commit 7f77ddf

Browse files
committed
put only histref in the partial
1 parent bf85767 commit 7f77ddf

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

src/dask_histogram/core.py

+10-2
Original file line numberDiff line numberDiff line change
@@ -1026,9 +1026,17 @@ def _partitioned_histogram(
10261026
# Single awkward array object.
10271027
if len(data) == 1 and data_is_dak:
10281028
from dask_awkward.lib.core import partitionwise_layer as dak_pwl
1029+
f = partial(_blocked_dak, histref=histref)
10291030

1030-
f = partial(_blocked_dak, weights=weights, sample=sample, histref=histref)
1031-
g = dak_pwl(f, name, data[0])
1031+
x = data[0]
1032+
if weights is not None and sample is not None:
1033+
g = dak_pwl(f, name, x, weights, sample)
1034+
elif weights is not None and sample is None:
1035+
g = dak_pwl(f, name, x, weights, None)
1036+
elif weights is None and sample is not None:
1037+
g = dak_pwl(f, name, x, None, sample)
1038+
else:
1039+
g = dak_pwl(f, name, x, None, None)
10321040

10331041
# Single object, not a dataframe
10341042
elif len(data) == 1 and not data_is_df:

0 commit comments

Comments
 (0)