diff options
author | Charles Harris <charlesr.harris@gmail.com> | 2020-12-04 16:03:19 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-12-04 16:03:19 -0700 |
commit | b0b9accf8f7f824a23f33c29f5184236ec3ead3f (patch) | |
tree | 89f25a9eea335ac540e1c389609ff8a343c70ffc | |
parent | a3f6bef3c027544a8fb2e05b4d904f203836e171 (diff) | |
parent | 572d37df9b9a640c7d8bd4e93f1390dcdcd47378 (diff) | |
download | numpy-b0b9accf8f7f824a23f33c29f5184236ec3ead3f.tar.gz |
Merge pull request #17918 from charris/backport-17907
Fix AttributeError: 'bool' object has no attribute 'ndim'
-rw-r--r-- | numpy/testing/_private/utils.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/numpy/testing/_private/utils.py b/numpy/testing/_private/utils.py index 4097a6738..8a117b419 100644 --- a/numpy/testing/_private/utils.py +++ b/numpy/testing/_private/utils.py @@ -742,7 +742,7 @@ def assert_array_compare(comparison, x, y, err_msg='', verbose=True, # 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 |