summaryrefslogtreecommitdiff
path: root/numpy/__init__.py
diff options
context:
space:
mode:
authorSebastian Berg <sebastian@sipsolutions.net>2021-01-26 13:06:45 -0600
committerCharles Harris <charlesr.harris@gmail.com>2021-01-26 14:22:25 -0700
commitb66733ce7ce53a525993465faecd1df5922f901e (patch)
tree955092f607859a7a8ca355fc902d1e8121d72d59 /numpy/__init__.py
parent9b1e38d2a199384203629780535ff613bbe8dbbd (diff)
downloadnumpy-b66733ce7ce53a525993465faecd1df5922f901e.tar.gz
Update numpy/__init__.py
Co-authored-by: Eric Wieser <wieser.eric@gmail.com>
Diffstat (limited to 'numpy/__init__.py')
-rw-r--r--numpy/__init__.py9
1 files changed, 4 insertions, 5 deletions
diff --git a/numpy/__init__.py b/numpy/__init__.py
index b1a7c8b4a..067b06c67 100644
--- a/numpy/__init__.py
+++ b/numpy/__init__.py
@@ -186,11 +186,10 @@ else:
("str", _specific_msg.format("str_")),
("int", _int_extended_msg.format("int"))]
- for n, extended_msg in _type_info:
- __deprecated_attrs__[n] = (getattr(_builtins, n),
- _msg.format(n=n, extended_msg=extended_msg))
-
- del n, extended_msg
+ __deprecated_attrs__.update({
+ n: (getattr(_builtins, n), _msg.format(n=n, extended_msg=extended_msg))
+ for n, extended_msg in _type_info
+ })
_msg = (
"`np.{n}` is a deprecated alias for `np.compat.{n}`. "