diff options
author | Srinivas Reddy Thatiparthy <thatiparthysreenivas@gmail.com> | 2017-08-26 19:59:24 +0530 |
---|---|---|
committer | Srinivas Reddy Thatiparthy <thatiparthysreenivas@gmail.com> | 2017-08-26 19:59:24 +0530 |
commit | be08980377cf2cd0c136e32eb0c644d392e5c7be (patch) | |
tree | 001da4c5e113586d919ff4428a425262bbb49bd5 /numpy/core/fromnumeric.py | |
parent | 0725fff599e78fd2438b603a341f122e81a908fa (diff) | |
download | numpy-be08980377cf2cd0c136e32eb0c644d392e5c7be.tar.gz |
MAINT: remove try..except clause.
- Generator type has been added to types module in 2.2 we do not need to catch AttributeError
Diffstat (limited to 'numpy/core/fromnumeric.py')
-rw-r--r-- | numpy/core/fromnumeric.py | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/numpy/core/fromnumeric.py b/numpy/core/fromnumeric.py index 10b20c0b1..6f7c45859 100644 --- a/numpy/core/fromnumeric.py +++ b/numpy/core/fromnumeric.py @@ -28,12 +28,7 @@ __all__ = [ 'std', 'sum', 'swapaxes', 'take', 'trace', 'transpose', 'var', ] - -try: - _gentype = types.GeneratorType -except AttributeError: - _gentype = type(None) - +_gentype = types.GeneratorType # save away Python sum _sum_ = sum |