summaryrefslogtreecommitdiff
path: root/numpy/testing/_private/utils.py
diff options
context:
space:
mode:
authorChristoph Gohlke <cgohlke@uci.edu>2020-12-03 12:35:40 -0800
committerGitHub <noreply@github.com>2020-12-03 12:35:40 -0800
commitbd7609c2aa11de9f46d084e607ae42d1bbe17797 (patch)
tree2065cdeff76af64971d289d7ada08434192832e2 /numpy/testing/_private/utils.py
parent92bf2f6d81252f97a7acc69fcc016636b29d1277 (diff)
downloadnumpy-bd7609c2aa11de9f46d084e607ae42d1bbe17797.tar.gz
Fix AttributeError: 'bool' object has no attribute 'ndim'
Diffstat (limited to 'numpy/testing/_private/utils.py')
-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