diff options
author | Mark Wiebe <mwiebe@enthought.com> | 2011-06-22 10:42:22 -0500 |
---|---|---|
committer | Mark Wiebe <mwiebe@enthought.com> | 2011-06-22 10:42:22 -0500 |
commit | 7ab154b90e9db0a3aab1af3a02502cfda25ecbe3 (patch) | |
tree | 02d60002b5776682df515571ead60e126159e6a2 /numpy/core/_internal.py | |
parent | 5484bb67606bd77536c6f0f801582857e5cacbf3 (diff) | |
download | numpy-7ab154b90e9db0a3aab1af3a02502cfda25ecbe3.tar.gz |
ENH: dtype-struct: Ensure alignment of nested struct dtypes
Diffstat (limited to 'numpy/core/_internal.py')
-rw-r--r-- | numpy/core/_internal.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/numpy/core/_internal.py b/numpy/core/_internal.py index a5b6d117a..99e64d475 100644 --- a/numpy/core/_internal.py +++ b/numpy/core/_internal.py @@ -12,7 +12,7 @@ if (sys.byteorder == 'little'): else: _nbo = asbytes('>') -def _makenames_list(adict): +def _makenames_list(adict, align): from multiarray import dtype allfields = [] fnames = adict.keys() @@ -26,7 +26,7 @@ def _makenames_list(adict): num = int(obj[1]) if (num < 0): raise ValueError("invalid offset.") - format = dtype(obj[0]) + format = dtype(obj[0], align=align) if (format.itemsize == 0): raise ValueError("all itemsizes must be fixed.") if (n > 2): @@ -53,7 +53,7 @@ def _usefields(adict, align): except KeyError: names = None if names is None: - names, formats, offsets, titles = _makenames_list(adict) + names, formats, offsets, titles = _makenames_list(adict, align) else: formats = [] offsets = [] |