diff options
Diffstat (limited to 'numpy/testing/utils.py')
-rw-r--r-- | numpy/testing/utils.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/numpy/testing/utils.py b/numpy/testing/utils.py index 4905898d2..01c0e769b 100644 --- a/numpy/testing/utils.py +++ b/numpy/testing/utils.py @@ -318,7 +318,9 @@ def assert_equal(actual,desired,err_msg='',verbose=True): # as before except (TypeError, ValueError, NotImplementedError): pass - if desired != actual : + + # Explicitly use __eq__ for comparison, ticket #2552 + if not (desired == actual): raise AssertionError(msg) def print_assert_equal(test_string, actual, desired): |