summaryrefslogtreecommitdiff
path: root/numpy/core/numeric.py
diff options
context:
space:
mode:
authorCharles Harris <charlesr.harris@gmail.com>2015-11-04 15:37:22 -0700
committerCharles Harris <charlesr.harris@gmail.com>2015-11-04 15:37:22 -0700
commit7036842f828fa41f95c333812bccccb3ae469f91 (patch)
tree5bab145196eb31b897178c0dbe02e96dffdee44b /numpy/core/numeric.py
parent615e66b19defa2d9fbfa94d6118fb6243ae90ffe (diff)
downloadnumpy-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.py3
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):
"""