diff options
Diffstat (limited to 'numpy')
-rw-r--r-- | numpy/core/records.py | 3 | ||||
-rw-r--r-- | numpy/ma/mrecords.py | 3 |
2 files changed, 2 insertions, 4 deletions
diff --git a/numpy/core/records.py b/numpy/core/records.py index a1439f9df..a1cad9075 100644 --- a/numpy/core/records.py +++ b/numpy/core/records.py @@ -496,8 +496,7 @@ class recarray(ndarray): except Exception: fielddict = ndarray.__getattribute__(self, 'dtype').fields or {} if attr not in fielddict: - exctype, value = sys.exc_info()[:2] - raise exctype(value) + raise else: fielddict = ndarray.__getattribute__(self, 'dtype').fields or {} if attr not in fielddict: diff --git a/numpy/ma/mrecords.py b/numpy/ma/mrecords.py index 826fb0f64..ae1a12c2c 100644 --- a/numpy/ma/mrecords.py +++ b/numpy/ma/mrecords.py @@ -260,8 +260,7 @@ class MaskedRecords(MaskedArray, object): fielddict = ndarray.__getattribute__(self, 'dtype').fields or {} optinfo = ndarray.__getattribute__(self, '_optinfo') or {} if not (attr in fielddict or attr in optinfo): - exctype, value = sys.exc_info()[:2] - raise exctype(value) + raise else: # Get the list of names fielddict = ndarray.__getattribute__(self, 'dtype').fields or {} |