diff options
author | Travis Oliphant <oliphant@enthought.com> | 2006-10-03 15:15:54 +0000 |
---|---|---|
committer | Travis Oliphant <oliphant@enthought.com> | 2006-10-03 15:15:54 +0000 |
commit | c7e811cd0f9aef43a90df12bd2daf02ac2cc144f (patch) | |
tree | 3676b3aa6d898869c5883ea39ab6f0a5e302fa65 /numpy/core/records.py | |
parent | 6cef646e900565129caf116380f75136f155c516 (diff) | |
download | numpy-c7e811cd0f9aef43a90df12bd2daf02ac2cc144f.tar.gz |
Allow lists to work with rec.array using fromrecords.py. But, tuples are the standard for records as the ndarray only allows tuples to be used for records.
Diffstat (limited to 'numpy/core/records.py')
-rw-r--r-- | numpy/core/records.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/numpy/core/records.py b/numpy/core/records.py index 299a1a9f4..c9d62d2f5 100644 --- a/numpy/core/records.py +++ b/numpy/core/records.py @@ -496,7 +496,7 @@ def array(obj, dtype=None, shape=None, offset=0, strides=None, formats=None, return fromstring(obj, dtype, shape=shape, offset=offset, **kwds) elif isinstance(obj, (list, tuple)): - if isinstance(obj[0], tuple): + if isinstance(obj[0], (tuple, list)): return fromrecords(obj, dtype=dtype, shape=shape, **kwds) else: return fromarrays(obj, dtype=dtype, shape=shape, **kwds) |