summaryrefslogtreecommitdiff
path: root/numpy/__init__.py
diff options
context:
space:
mode:
Diffstat (limited to 'numpy/__init__.py')
-rw-r--r--numpy/__init__.py14
1 files changed, 13 insertions, 1 deletions
diff --git a/numpy/__init__.py b/numpy/__init__.py
index 58adeaeab..e8d1820a1 100644
--- a/numpy/__init__.py
+++ b/numpy/__init__.py
@@ -110,7 +110,8 @@ import sys
import warnings
from ._globals import (
- ModuleDeprecationWarning, VisibleDeprecationWarning, _NoValue
+ ModuleDeprecationWarning, VisibleDeprecationWarning,
+ _NoValue, _CopyMode
)
# We first need to detect if we're being called as part of the numpy setup
@@ -188,12 +189,19 @@ else:
n: (getattr(_builtins, n), _msg.format(n=n, extended_msg=extended_msg))
for n, extended_msg in _type_info
})
+
# Numpy 1.20.0, 2020-10-19
__deprecated_attrs__["typeDict"] = (
core.numerictypes.typeDict,
"`np.typeDict` is a deprecated alias for `np.sctypeDict`."
)
+ # NumPy 1.22, 2021-10-20
+ __deprecated_attrs__["MachAr"] = (
+ core._machar.MachAr,
+ "`np.MachAr` is deprecated (NumPy 1.22)."
+ )
+
_msg = (
"`np.{n}` is a deprecated alias for `np.compat.{n}`. "
"To silence this warning, use `np.compat.{n}` by itself. "
@@ -226,6 +234,10 @@ else:
__all__.extend(lib.__all__)
__all__.extend(['linalg', 'fft', 'random', 'ctypeslib', 'ma'])
+ # Remove one of the two occurrences of `issubdtype`, which is exposed as
+ # both `numpy.core.issubdtype` and `numpy.lib.issubdtype`.
+ __all__.remove('issubdtype')
+
# These are exported by np.core, but are replaced by the builtins below
# remove them to ensure that we don't end up with `np.long == np.int_`,
# which would be a breaking change.