From bd7609c2aa11de9f46d084e607ae42d1bbe17797 Mon Sep 17 00:00:00 2001 From: Christoph Gohlke Date: Thu, 3 Dec 2020 12:35:40 -0800 Subject: Fix AttributeError: 'bool' object has no attribute 'ndim' --- numpy/testing/_private/utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'numpy/testing/_private/utils.py') 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 -- cgit v1.2.1