diff options
author | Stephan Hoyer <shoyer@climate.com> | 2016-01-12 20:44:34 -0800 |
---|---|---|
committer | Stephan Hoyer <shoyer@climate.com> | 2016-01-14 13:44:43 -0800 |
commit | 53ad26a84ac2aa6f5a37f09aa9feae5afed44f79 (patch) | |
tree | 856886f3b9d65fb6305f21f9d692cb0861b861cb /numpy/ma/testutils.py | |
parent | 8fa6e3bef26a6d4a2c92f2824129aa4409be2590 (diff) | |
download | numpy-53ad26a84ac2aa6f5a37f09aa9feae5afed44f79.tar.gz |
TST, ENH: make all comparisons with NaT false
Now, NaT compares like NaN:
- NaT != NaT -> True
- NaT == NaT (and all other comparisons) -> False
We discussed this on the mailing list back in October:
https://mail.scipy.org/pipermail/numpy-discussion/2015-October/073968.html
Diffstat (limited to 'numpy/ma/testutils.py')
-rw-r--r-- | numpy/ma/testutils.py | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/numpy/ma/testutils.py b/numpy/ma/testutils.py index 8dc821878..40b9fa1be 100644 --- a/numpy/ma/testutils.py +++ b/numpy/ma/testutils.py @@ -125,10 +125,7 @@ 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)): - msg = build_err_msg([actual, desired], err_msg,) - if not desired == actual: - raise AssertionError(msg) - return + return utils.assert_equal(actual, desired) # Case #4. arrays or equivalent if ((actual is masked) and not (desired is masked)) or \ ((desired is masked) and not (actual is masked)): |