summaryrefslogtreecommitdiff
path: root/numpy/core/numeric.py
diff options
context:
space:
mode:
Diffstat (limited to 'numpy/core/numeric.py')
-rw-r--r--numpy/core/numeric.py5
1 files changed, 1 insertions, 4 deletions
diff --git a/numpy/core/numeric.py b/numpy/core/numeric.py
index aa5be1af3..0289add3b 100644
--- a/numpy/core/numeric.py
+++ b/numpy/core/numeric.py
@@ -2650,10 +2650,7 @@ _errdict = {"ignore": ERR_IGNORE,
"print": ERR_PRINT,
"log": ERR_LOG}
-_errdict_rev = {}
-for key in _errdict.keys():
- _errdict_rev[_errdict[key]] = key
-del key
+_errdict_rev = {value: key for key, value in _errdict.items()}
@set_module('numpy')