Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BUG: stats.binned_statistic_2d user function expecting arrays #13633

Merged
merged 1 commit into from Mar 13, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion scipy/stats/_binned_statistic.py
Expand Up @@ -645,7 +645,7 @@ def _calc_binned_statistic(Vdim, bin_numbers, result, values, stat_func,
# if the stat_func is np.std, calc std only when binned data is 2
# or more for speed up.
if is_callable or not (stat_func is np.std and len(bin_map[i]) < 2):
result[vv, i] = stat_func(bin_map[i])
result[vv, i] = stat_func(np.array(bin_map[i]))
tylerjereddy marked this conversation as resolved.
Show resolved Hide resolved


def _create_binned_data(bin_numbers, unique_bin_numbers, values, vv):
Expand Down