Skip to content

Commit

Permalink
Fix regression: block_size argument not used
Browse files Browse the repository at this point in the history
  • Loading branch information
TomNicholas committed Jun 14, 2021
1 parent 8a6765a commit d7750ff
Showing 1 changed file with 15 additions and 3 deletions.
18 changes: 15 additions & 3 deletions xhistogram/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,9 @@ def _bincount_2d_vectorized(
return bin_counts


def _bincount(*all_arrays, weights=False, axis=None, bins=None, density=None):
def _bincount(
*all_arrays, weights=False, axis=None, bins=None, density=None, block_size=None
):
a0 = all_arrays[0]

do_full_array = (axis is None) or (set(axis) == set(_range(a0.ndim)))
Expand Down Expand Up @@ -230,7 +232,11 @@ def reshape_input(a):
weights_array = None

bin_counts = _bincount_2d_vectorized(
*all_arrays_reshaped, bins=bins, weights=weights_array, density=density
*all_arrays_reshaped,
bins=bins,
weights=weights_array,
density=density,
block_size=block_size,
)

final_shape = kept_axes_shape + bin_counts.shape[1:]
Expand Down Expand Up @@ -375,7 +381,13 @@ def histogram(
bins = [
np.histogram_bin_edges(a, b, r) for a, b, r in zip(all_arrays, bins, range)
]
bincount_kwargs = dict(weights=has_weights, axis=axis, bins=bins, density=density)
bincount_kwargs = dict(
weights=has_weights,
axis=axis,
bins=bins,
density=density,
block_size=block_size,
)

# remove these axes from the inputs
if axis is not None:
Expand Down

0 comments on commit d7750ff

Please sign in to comment.