summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSebastian Berg <sebastianb@nvidia.com>2022-12-13 20:30:22 +0100
committerGitHub <noreply@github.com>2022-12-13 11:30:22 -0800
commit3139a881346ff7ad4326ecd296e6eeddf6c268a0 (patch)
treec04943b0b2a50ce5c54ba90ebbf909daf6a8ef23
parenta24ddad5d1d43ec9bea474abf8068ee6b8db01db (diff)
downloadnumpy-3139a881346ff7ad4326ecd296e6eeddf6c268a0.tar.gz
MAINT: Remove two TODO notes that got outdated (#22788)
The first one should have been removed in gh-22735, the second an even more random find.
-rw-r--r--numpy/core/tests/test_datetime.py7
-rw-r--r--numpy/exceptions.py8
2 files changed, 3 insertions, 12 deletions
diff --git a/numpy/core/tests/test_datetime.py b/numpy/core/tests/test_datetime.py
index 693eed0e2..2480a2629 100644
--- a/numpy/core/tests/test_datetime.py
+++ b/numpy/core/tests/test_datetime.py
@@ -1003,12 +1003,11 @@ class TestDateTime:
casting='unsafe'))
# Shouldn't be able to compare datetime and timedelta
- # TODO: Changing to 'same_kind' or 'safe' casting in the ufuncs by
- # default is needed to properly catch this kind of thing...
a = np.array('2012-12-21', dtype='M8[D]')
b = np.array(3, dtype='m8[D]')
- #assert_raises(TypeError, np.less, a, b)
- assert_raises(TypeError, np.less, a, b, casting='same_kind')
+ assert_raises(TypeError, np.less, a, b)
+ # not even if "unsafe"
+ assert_raises(TypeError, np.less, a, b, casting='unsafe')
def test_datetime_like(self):
a = np.array([3], dtype='m8[4D]')
diff --git a/numpy/exceptions.py b/numpy/exceptions.py
index d2fe9257b..73ad5ea6d 100644
--- a/numpy/exceptions.py
+++ b/numpy/exceptions.py
@@ -32,8 +32,6 @@ Exceptions
"""
-from ._utils import set_module as _set_module
-
__all__ = [
"ComplexWarning", "VisibleDeprecationWarning", "ModuleDeprecationWarning",
"TooHardError", "AxisError", "DTypePromotionError"]
@@ -46,12 +44,6 @@ if '_is_loaded' in globals():
_is_loaded = True
-# TODO: One day, we should remove the _set_module here before removing them
-# fully. Not doing it now, just to allow unpickling to work on older
-# versions for a bit. (Module exists since NumPy 1.25.)
-# This then also means that the typing stubs should be moved!
-
-
class ComplexWarning(RuntimeWarning):
"""
The warning raised when casting a complex dtype to a real dtype.