summaryrefslogtreecommitdiff
path: root/numpy/core/numeric.py
diff options
context:
space:
mode:
authorEric Wieser <wieser.eric@gmail.com>2018-06-13 01:27:56 -0700
committerEric Wieser <wieser.eric@gmail.com>2018-06-13 22:19:54 -0700
commita8556c1007dbf7eb329caaa3dbffc9cd708359ec (patch)
tree2c94ff97d1be7fd86b422915f433c5a5abfc3c80 /numpy/core/numeric.py
parent4153c7371f6da5d4b575d8d7f9a486a83ed6f1e4 (diff)
downloadnumpy-a8556c1007dbf7eb329caaa3dbffc9cd708359ec.tar.gz
MAINT: Use a set instead of a dictionary
Diffstat (limited to 'numpy/core/numeric.py')
-rw-r--r--numpy/core/numeric.py6
1 files changed, 2 insertions, 4 deletions
diff --git a/numpy/core/numeric.py b/numpy/core/numeric.py
index 7ade3d224..4ff12dbbd 100644
--- a/numpy/core/numeric.py
+++ b/numpy/core/numeric.py
@@ -2914,15 +2914,13 @@ True_ = bool_(True)
def extend_all(module):
- adict = {}
- for a in __all__:
- adict[a] = 1
+ existing = set(__all__)
try:
mall = getattr(module, '__all__')
except AttributeError:
mall = [k for k in module.__dict__.keys() if not k.startswith('_')]
for a in mall:
- if a not in adict:
+ if a not in existing:
__all__.append(a)