Repository navigation
Conversation
A unit test included, which fails before this patch, because dtype.descr has extra entries when padding is present.
|
Nice catch! I think this we can get this merged without too much more effort, but I have two suggestions to consider first: First, the same type of fix may be needed a few lines down (line 426) for Second, maybe instead of patching def _recursive_set_fill_value(fillvalue, dtype):
fillvalue = np.resize(fillvalue, len(dtype.names))
output_value = []
for (fval, name) in zip(fillvalue, dtype.names):
cdtype = dtype[name]
if cdtype.names:
output_value.append(tuple(_recursive_set_fill_value(fval, cdtype)))
else:
output_value.append(np.array(fval, dtype=cdtype).item())
return tuple(output_value)and have A similar change would be needed for |
|
@ahaldane What you say sounds reasonable. I'm not volunteering to do it, but it did strike me that using descr there is unfortunate. Sidebar: I was surprised to see this code was called even if I passed a |
|
OK, in that case I took a shot at removing use of Is that all right? |
|
Thanks for finding the bug and identifying the problem code @jzwinck ! |
A unit test included, which fails before this patch,
because dtype.descr has extra entries when padding is present.