summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCharles Harris <charlesr.harris@gmail.com>2020-12-04 13:49:59 -0700
committerGitHub <noreply@github.com>2020-12-04 13:49:59 -0700
commit45840adcf20eabc665d2fc17f28bf93e75bdf20a (patch)
tree9518c2b82e7ba359dbcbc3a0b47dcf9c2b2386ad
parent0b311f4f6c5208946f72d022a97c818c58178b52 (diff)
parentbd7609c2aa11de9f46d084e607ae42d1bbe17797 (diff)
downloadnumpy-45840adcf20eabc665d2fc17f28bf93e75bdf20a.tar.gz
Merge pull request #17907 from cgohlke/patch-1
BUG: 'bool' object has no attribute 'ndim'
-rw-r--r--numpy/testing/_private/utils.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/numpy/testing/_private/utils.py b/numpy/testing/_private/utils.py
index fb33bdcbd..e974bbd09 100644
--- a/numpy/testing/_private/utils.py
+++ b/numpy/testing/_private/utils.py
@@ -745,7 +745,7 @@ def assert_array_compare(comparison, x, y, err_msg='', verbose=True, header='',
# flag as it everywhere, so we should return the scalar flag.
if isinstance(x_id, bool) or x_id.ndim == 0:
return bool_(x_id)
- elif isinstance(x_id, bool) or y_id.ndim == 0:
+ elif isinstance(y_id, bool) or y_id.ndim == 0:
return bool_(y_id)
else:
return y_id