Open
Description
Split out of #13399
class Struct(ctypes.Structure):
_fields_ = [('a', ctypes.c_uint8), ('b', ctypes.c_uint16)]
data = (Struct * 4)()
np.array(data) # ok
np.array(list(data))
# RuntimeWarning: A builtin ctypes object gave a PEP3118 format string that does not match its itemsize, so a best-guess will be made of the data type. Newer versions of python may behave correctly.
# ValueError: invalid literal for int() with base 10: b'\x00\x00\x00\x00'
We should either correctly parse an iterable of buffers or raise a better error.