From 7036842f828fa41f95c333812bccccb3ae469f91 Mon Sep 17 00:00:00 2001 From: Charles Harris Date: Wed, 4 Nov 2015 15:37:22 -0700 Subject: 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. --- numpy/core/numeric.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'numpy/core/numeric.py') 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): """ -- cgit v1.2.1