diff options
author | Stephan Hoyer <shoyer@google.com> | 2019-06-11 21:13:12 -0400 |
---|---|---|
committer | Stephan Hoyer <shoyer@google.com> | 2019-06-11 21:13:18 -0400 |
commit | 080bf0064b64c3c95499473101c297c3d10e5348 (patch) | |
tree | eeb1e1215708c7bf66b9ec540b59261c4ed4a1f8 /numpy/lib/twodim_base.py | |
parent | bc3c7176987a5017126abbc861458fe53cd099fc (diff) | |
download | numpy-080bf0064b64c3c95499473101c297c3d10e5348.tar.gz |
MAINT: fix histogram*d dispatchers
fixes GH-13728
Diffstat (limited to 'numpy/lib/twodim_base.py')
-rw-r--r-- | numpy/lib/twodim_base.py | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/numpy/lib/twodim_base.py b/numpy/lib/twodim_base.py index e165c9b02..1928aa10c 100644 --- a/numpy/lib/twodim_base.py +++ b/numpy/lib/twodim_base.py @@ -565,7 +565,13 @@ def vander(x, N=None, increasing=False): def _histogram2d_dispatcher(x, y, bins=None, range=None, normed=None, weights=None, density=None): - return (x, y, bins, weights) + yield x + yield y + if hasattr(bins, 'shape'): # same condition as used in histogramdd + yield bins + else: + yield from bins + return weights @array_function_dispatch(_histogram2d_dispatcher) |