diff options
author | Christoph Gohlke <cgohlke@uci.edu> | 2020-12-03 12:35:40 -0800 |
---|---|---|
committer | Charles Harris <charlesr.harris@gmail.com> | 2020-12-04 14:34:23 -0700 |
commit | 572d37df9b9a640c7d8bd4e93f1390dcdcd47378 (patch) | |
tree | 8d47856250839be9c46599ca296fba5c413779f0 | |
parent | 672a6c8488c7396a6b499b88b2c3fa865bd490f6 (diff) | |
download | numpy-572d37df9b9a640c7d8bd4e93f1390dcdcd47378.tar.gz |
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 |