diff options
author | Travis Oliphant <oliphant@enthought.com> | 2006-10-30 22:05:11 +0000 |
---|---|---|
committer | Travis Oliphant <oliphant@enthought.com> | 2006-10-30 22:05:11 +0000 |
commit | 6d3f78e6665122ec7b9dffaa1c81c0327bccd365 (patch) | |
tree | 7e7218d4d38c86fe7ea0c9df322b47de5b04734a /numpy/core/records.py | |
parent | 4d11fdfa180f9e1412b18278c95b17d2040ea67f (diff) | |
download | numpy-6d3f78e6665122ec7b9dffaa1c81c0327bccd365.tar.gz |
Fixes when fielddict is None
Diffstat (limited to 'numpy/core/records.py')
-rw-r--r-- | numpy/core/records.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/numpy/core/records.py b/numpy/core/records.py index a6d2b48b0..8bcc0c481 100644 --- a/numpy/core/records.py +++ b/numpy/core/records.py @@ -213,12 +213,12 @@ class recarray(ndarray): try: ret = object.__setattr__(self, attr, val) except: - fielddict = ndarray.__getattribute__(self,'dtype').fields + fielddict = ndarray.__getattribute__(self,'dtype').fields or {} if attr not in fielddict: exctype, value = sys.exc_info()[:2] raise exctype, value else: - fielddict = ndarray.__getattribute__(self,'dtype').fields + fielddict = ndarray.__getattribute__(self,'dtype').fields or {} if attr not in fielddict: return ret if newattr: # We just added this one |