SMQTK icon indicating copy to clipboard operation
SMQTK copied to clipboard

Support latest version on numpy in pickle operation

Open mattdawkins opened this issue 6 years ago • 2 comments

mattdawkins avatar Nov 19 '19 04:11 mattdawkins

I thought this was originally not required for this as I thought that saving the tuple-cast version of the set would use numpy format. Turns out though that when using large integers, e.g. 256-bit ints (because hash codes), numpy can't use one of its built-in types to cast to so it creates an array whose values are of python-object type. Then, because this isn't a numpy type, numpy cascades into using pickle to serialize the array components. Thus allow_pickle is required on load of that array due to the default change in numpy.

Purg avatar Nov 19 '19 15:11 Purg

@mattdawkins Is there bandwidth to add a unit test for this as well as adding a change-note?

Purg avatar Nov 19 '19 15:11 Purg