summaryrefslogtreecommitdiff
path: root/scipy/base/records.py
diff options
context:
space:
mode:
authorTravis Oliphant <oliphant@enthought.com>2005-12-13 22:06:29 +0000
committerTravis Oliphant <oliphant@enthought.com>2005-12-13 22:06:29 +0000
commitcffac3dad9f46fea895b6eb1fc5e76d532d7eb2a (patch)
treecc90da82334d269a4e8761967e06a7a044956bb0 /scipy/base/records.py
parentb5dbca15fc13e9714e57d24bb4a6e67fdeaacd2d (diff)
downloadnumpy-cffac3dad9f46fea895b6eb1fc5e76d532d7eb2a.tar.gz
Fix byte-order issues on record arrays.
Diffstat (limited to 'scipy/base/records.py')
-rw-r--r--scipy/base/records.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/scipy/base/records.py b/scipy/base/records.py
index 793d9599a..3c0c8d792 100644
--- a/scipy/base/records.py
+++ b/scipy/base/records.py
@@ -239,7 +239,7 @@ class record(nt.void):
# The recarray is almost identical to a standard array (which supports
# named fields already) The biggest difference is that it can use
-# attribute-lookup to the fields.
+# attribute-lookup to find the fields and it returns a record item.
class recarray(sb.ndarray):
@@ -263,9 +263,10 @@ class recarray(sb.ndarray):
if buf is None:
self = sb.ndarray.__new__(subtype, shape, (record, descr))
else:
+ byteorder = byteorder.lower()
swap = ((byteorder != _sysbyte) and (byteorder in _byteorders))
self = sb.ndarray.__new__(subtype, shape, (record, descr),
- buffer=buf, swap=swap)
+ buffer=buf, offset=offset, swap=swap)
return self
def __getattribute__(self, attr):