summaryrefslogtreecommitdiff
path: root/numpy/lib/histograms.py
diff options
context:
space:
mode:
authorCharles Harris <charlesr.harris@gmail.com>2017-12-24 11:23:48 -0700
committerGitHub <noreply@github.com>2017-12-24 11:23:48 -0700
commitd45cf0b261b4a563f44fa238d34bd55f051f315f (patch)
tree6ef116d151679c303b9b8fc6cd865b3cf0a5154e /numpy/lib/histograms.py
parentb2f3dd3270ae98f20648ab403b5edfc23277223f (diff)
parent99f605c4545597e9a3bdf66f97b98da30f78ae33 (diff)
downloadnumpy-d45cf0b261b4a563f44fa238d34bd55f051f315f.tar.gz
Merge pull request #10268 from eric-wieser/fix-gh-7864
BUG: Fix misleading error when coercing to array
Diffstat (limited to 'numpy/lib/histograms.py')
-rw-r--r--numpy/lib/histograms.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/numpy/lib/histograms.py b/numpy/lib/histograms.py
index d75a18fce..9c4ba8efc 100644
--- a/numpy/lib/histograms.py
+++ b/numpy/lib/histograms.py
@@ -228,7 +228,7 @@ def _get_outer_edges(a, range):
if first_edge > last_edge:
raise ValueError(
'max must be larger than min in range parameter.')
- if not np.all(np.isfinite([first_edge, last_edge])):
+ if not (np.isfinite(first_edge) and np.isfinite(last_edge)):
raise ValueError(
'range parameter must be finite.')
if first_edge == last_edge: