Repository navigation
BUG: fixed dtype alignment for array of structs in case of converting from tuple descr - #10923
Conversation
There was a problem hiding this comment.
all the tab characters here should be four spaces. (no tabs allowed in numpy code!)
(same below)
|
Looks good, thanks for the PR! I have two requests, and after that I think it will be ready to merge:
|
|
Done. |
There was a problem hiding this comment.
these lines go over 80 characters, which is the max we want. Could you split them so they are less than 80 chars? Something like
assert_equal(dt1.descr, [('a', '|i1'), ('', '|V3'),
('b', [('f0', '<i2'), ('', '|V2'),
('f1', '<f4')], (2,))])|
Everything else looks good. |
…f converting from tuple descr
|
Fixed lines length. |
|
Great, thanks a lot @ihormelnyk ! This was a pretty annoying bug, I'm glad it's fixed. Merging now... |
Descr of array of subtype with alignment
t = np.dtype([('a', '|i1'), ('b', [('f0', '<i2'), ('f1', '<f4')], 2)], align=True)
actual dtype:
[('a', '|i1'), ('b', [('f0', '<i2'), ('f1', '<f4')], (2,))]
expected dtype:
[('a', '|i1'), (, '|V3'), ('b', [('f0', '<i2'), (, '|V2'), ('f1', '<f4')], 2)]
Fixes #663.