diff options
author | Sebastian Berg <sebastian@sipsolutions.net> | 2015-09-25 17:41:51 +0200 |
---|---|---|
committer | Sebastian Berg <sebastian@sipsolutions.net> | 2015-09-25 17:42:52 +0200 |
commit | 8863ee9a24e866f79653f57154d431246a0e9079 (patch) | |
tree | d2284bdcf7ba24fad29119d4d31e0cd89d832e96 /numpy/core/_internal.py | |
parent | 7001d613aaa445ff650a273ec3d4db6787daf2e3 (diff) | |
download | numpy-8863ee9a24e866f79653f57154d431246a0e9079.tar.gz |
BUG: Add void field at end of dtype.descr to match itemsize
dtype.descr returns void fields to explain the padding part of
the dtype. The last void field for the itemsize itself was however
not included.
Closes gh-6359
Diffstat (limited to 'numpy/core/_internal.py')
-rw-r--r-- | numpy/core/_internal.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/numpy/core/_internal.py b/numpy/core/_internal.py index 879f4a224..81f5be4ad 100644 --- a/numpy/core/_internal.py +++ b/numpy/core/_internal.py @@ -121,6 +121,10 @@ def _array_descr(descriptor): offset += field[0].itemsize result.append(tup) + if descriptor.itemsize > offset: + num = descriptor.itemsize - offset + result.append(('', '|V%d' % num)) + return result # Build a new array from the information in a pickle. |