1 Nov
2006
1 Nov
'06
1:13 p.m.
Alexander Belopolsky schrieb:
I would also like to mention one more difference between NumPy datatypes and ctypes that I did not see discussed. In ctypes arrays of different shapes are represented using different types. As a result, if the object exporting its buffer is resized, the datatype object cannot be reused, it has to be replaced.
That's also an interesting issue for the datatypes PEP: are datatype objects meant to be immutable? This is particularly interesting for the extended buffer protocol: how long can one keep the data you get from bt_getarrayinfo? Also, how does the memory management work for the results? Regards, Martin