summaryrefslogtreecommitdiff
path: root/numpy/core/numeric.py
diff options
context:
space:
mode:
authorAndrew Nelson <andyfaff@gmail.com>2016-01-15 15:49:55 +1100
committerAndrew Nelson <andyfaff@gmail.com>2016-01-15 15:49:55 +1100
commit544be6da1b572b4bcff0355bfdaa573887a60830 (patch)
tree41e82460911bb1ee96c4163fb47c829b9a22ff6e /numpy/core/numeric.py
parentaa6335c494e4807d65404d91e0e9d25a7d2fe338 (diff)
downloadnumpy-544be6da1b572b4bcff0355bfdaa573887a60830.tar.gz
MAINT: ensureisclose returns scalar when called with two scalars
Diffstat (limited to 'numpy/core/numeric.py')
-rw-r--r--numpy/core/numeric.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/numpy/core/numeric.py b/numpy/core/numeric.py
index a18b38072..0b728f804 100644
--- a/numpy/core/numeric.py
+++ b/numpy/core/numeric.py
@@ -2467,7 +2467,11 @@ def isclose(a, b, rtol=1.e-5, atol=1.e-8, equal_nan=False):
# Make NaN == NaN
both_nan = isnan(x) & isnan(y)
cond[both_nan] = both_nan[both_nan]
- return cond
+
+ if isscalar(a) and isscalar(b):
+ return bool(cond)
+ else:
+ return cond
def array_equal(a1, a2):
"""