diff options
author | Sebastian Berg <sebastian@sipsolutions.net> | 2021-01-26 13:06:45 -0600 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-01-26 13:06:45 -0600 |
commit | 08c036c50be6f9bd45b5f07ccc7eca0bfdc77164 (patch) | |
tree | 30244c41c66bd547841fb49d6868b6598e82fc8c | |
parent | 4eb79d8cb0ffabd64f1aae727ecd1a7b749501d3 (diff) | |
download | numpy-08c036c50be6f9bd45b5f07ccc7eca0bfdc77164.tar.gz |
Update numpy/__init__.py
Co-authored-by: Eric Wieser <wieser.eric@gmail.com>
-rw-r--r-- | numpy/__init__.py | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/numpy/__init__.py b/numpy/__init__.py index 3fadc7a10..01f970345 100644 --- a/numpy/__init__.py +++ b/numpy/__init__.py @@ -190,11 +190,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}`. " @@ -422,4 +421,3 @@ else: from ._version import get_versions __version__ = get_versions()['version'] del get_versions - |