diff options
author | Travis Oliphant <oliphant@enthought.com> | 2006-09-15 18:24:30 +0000 |
---|---|---|
committer | Travis Oliphant <oliphant@enthought.com> | 2006-09-15 18:24:30 +0000 |
commit | 3cf31df5d76acf7ff31c23d6a387824fce68e9df (patch) | |
tree | f819c36e78e60a548e27ef6a37f89a30c2b72cf0 /numpy/core/_internal.py | |
parent | a761817d410c96e93a413f6ad98de17cb20fbd6b (diff) | |
download | numpy-3cf31df5d76acf7ff31c23d6a387824fce68e9df.tar.gz |
Fix .descr of aligned structures
Diffstat (limited to 'numpy/core/_internal.py')
-rw-r--r-- | numpy/core/_internal.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/numpy/core/_internal.py b/numpy/core/_internal.py index ff816faf5..cc2afdbf4 100644 --- a/numpy/core/_internal.py +++ b/numpy/core/_internal.py @@ -87,7 +87,9 @@ def _array_descr(descriptor): offset = 0 for field in ordered_fields: if field[1] > offset: - result.append(('','|V%d' % (field[1]-offset))) + num = field[1] - offset + result.append(('','|V%d' % num)) + offset += num if len(field) > 3: name = (field[2],field[3]) else: |