summaryrefslogtreecommitdiff
path: root/numpy/__init__.py
diff options
context:
space:
mode:
authorEric Wieser <wieser.eric@gmail.com>2019-11-11 23:13:04 +0000
committerEric Wieser <wieser.eric@gmail.com>2019-11-11 23:16:59 +0000
commit035ef5ac3ca52b9f14ea3effe739c6aaca9411bc (patch)
tree84849098f6b152292774c3905514321dcba9c8c7 /numpy/__init__.py
parentc592bf2210567ea58bc52f8e15a5f0de582f889b (diff)
downloadnumpy-035ef5ac3ca52b9f14ea3effe739c6aaca9411bc.tar.gz
BUG: Fix np.__dir__ to correctly handle new properties
Previously this would fail, but only on python 3.7+ ``` np.new_member = 1 assert 'new_member' in dir(np) ``` While this isn't something we support anyway, it certainly wasn't intentional.
Diffstat (limited to 'numpy/__init__.py')
-rw-r--r--numpy/__init__.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/numpy/__init__.py b/numpy/__init__.py
index fef8245de..722dcc45b 100644
--- a/numpy/__init__.py
+++ b/numpy/__init__.py
@@ -216,7 +216,7 @@ else:
"{!r}".format(__name__, attr))
def __dir__():
- return __all__ + ['Tester', 'testing']
+ return list(globals().keys()) + ['Tester', 'testing']
else:
# We don't actually use this ourselves anymore, but I'm not 100% sure that