diff options
author | Charles Harris <charlesr.harris@gmail.com> | 2018-08-31 13:44:59 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-08-31 13:44:59 -0500 |
commit | 866589cdf7ecb3054ec3ae6493612d51c9d5e56d (patch) | |
tree | a37f31bc41dc8c67530a823391b96f058fe9c26c /numpy/core/numeric.py | |
parent | 089a0e0e9d1e32f57ddb89be5f450125bc58f57f (diff) | |
parent | f17f229a4a5def56282df4a7e51461c9374385d8 (diff) | |
download | numpy-866589cdf7ecb3054ec3ae6493612d51c9d5e56d.tar.gz |
Merge branch 'master' into warn-float16-nan
Diffstat (limited to 'numpy/core/numeric.py')
-rw-r--r-- | numpy/core/numeric.py | 10 |
1 files changed, 1 insertions, 9 deletions
diff --git a/numpy/core/numeric.py b/numpy/core/numeric.py index e5570791a..1b4818b76 100644 --- a/numpy/core/numeric.py +++ b/numpy/core/numeric.py @@ -2850,16 +2850,11 @@ class errstate(object): Notes ----- - The ``with`` statement was introduced in Python 2.5, and can only be used - there by importing it: ``from __future__ import with_statement``. In - earlier Python versions the ``with`` statement is not available. - For complete documentation of the types of floating-point exceptions and treatment options, see `seterr`. Examples -------- - >>> from __future__ import with_statement # use 'with' in Python 2.5 >>> olderr = np.seterr(all='ignore') # Set error handling to known state. >>> np.arange(3) / 0. @@ -2919,10 +2914,7 @@ True_ = bool_(True) def extend_all(module): existing = set(__all__) - try: - mall = getattr(module, '__all__') - except AttributeError: - mall = [k for k in module.__dict__.keys() if not k.startswith('_')] + mall = getattr(module, '__all__') for a in mall: if a not in existing: __all__.append(a) |