summaryrefslogtreecommitdiff
path: root/numpy/ma/testutils.py
diff options
context:
space:
mode:
authorCharles Harris <charlesr.harris@gmail.com>2016-01-16 19:00:43 -0700
committerCharles Harris <charlesr.harris@gmail.com>2016-01-16 19:06:00 -0700
commite0cb3f79936656d6d2f48cbad46a3a9f2bad5ae1 (patch)
treed8b1410f9082ee82a4a7eb0d41b3a4dc3fe52ac4 /numpy/ma/testutils.py
parentad4b5b03470a4ca2ef3150faa721a0e239b3c203 (diff)
downloadnumpy-e0cb3f79936656d6d2f48cbad46a3a9f2bad5ae1.tar.gz
Revert "Merge pull request #7001 from shoyer/NaT-comparison"
This reverts commit 7141f40b58ed1e7071cde78ab7bc8ab37e9c5983, reversing changes made to 8fa6e3bef26a6d4a2c92f2824129aa4409be2590. The original broke some pandas tests. The current plan to get this in is * reversion * issue FutureWarning in 1.11 and 1.12 * make the change in 1.13.
Diffstat (limited to 'numpy/ma/testutils.py')
-rw-r--r--numpy/ma/testutils.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/numpy/ma/testutils.py b/numpy/ma/testutils.py
index 40b9fa1be..8dc821878 100644
--- a/numpy/ma/testutils.py
+++ b/numpy/ma/testutils.py
@@ -125,7 +125,10 @@ def assert_equal(actual, desired, err_msg=''):
if isinstance(desired, (list, tuple)) and isinstance(actual, (list, tuple)):
return _assert_equal_on_sequences(actual, desired, err_msg='')
if not (isinstance(actual, ndarray) or isinstance(desired, ndarray)):
- return utils.assert_equal(actual, desired)
+ msg = build_err_msg([actual, desired], err_msg,)
+ if not desired == actual:
+ raise AssertionError(msg)
+ return
# Case #4. arrays or equivalent
if ((actual is masked) and not (desired is masked)) or \
((desired is masked) and not (actual is masked)):