diff options
author | Charles Harris <charlesr.harris@gmail.com> | 2015-11-04 15:37:22 -0700 |
---|---|---|
committer | Charles Harris <charlesr.harris@gmail.com> | 2015-11-04 15:37:22 -0700 |
commit | 7036842f828fa41f95c333812bccccb3ae469f91 (patch) | |
tree | 5bab145196eb31b897178c0dbe02e96dffdee44b /numpy/core/numeric.py | |
parent | 615e66b19defa2d9fbfa94d6118fb6243ae90ffe (diff) | |
download | numpy-7036842f828fa41f95c333812bccccb3ae469f91.tar.gz |
BUG: Make allclose return python bool.
The function was returning an ndarray subtype when the at least one
of the arguments was a subtype.
Closes #6475.
Diffstat (limited to 'numpy/core/numeric.py')
-rw-r--r-- | numpy/core/numeric.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/numpy/core/numeric.py b/numpy/core/numeric.py index 4350e123f..2ece2ce8d 100644 --- a/numpy/core/numeric.py +++ b/numpy/core/numeric.py @@ -2278,7 +2278,8 @@ def allclose(a, b, rtol=1.e-5, atol=1.e-8, equal_nan=False): True """ - return all(isclose(a, b, rtol=rtol, atol=atol, equal_nan=equal_nan)) + res = all(isclose(a, b, rtol=rtol, atol=atol, equal_nan=equal_nan)) + return bool(res) def isclose(a, b, rtol=1.e-5, atol=1.e-8, equal_nan=False): """ |