I\'ve saved a number of numpy objects with the following code:
f = gzip.GzipFile(\'/some/path/file.npy.gz\', \"w\")
np.save(file=f, arr=np.rint(trimmed).asty
You've been doing this somehow by your means, but you may use numpy functions instead to save and load objects rather than using other functions.
You can save desired array by using save()
where array_obj is your array which you wish to save.
array_file = open('array.npy', 'wb')
numpy.save(array_file, array_obj)
Then, you may retrieve the desired array as following.
array_file = open('array.npy', 'rb')
array_obj = numpy.load(array_file)
Use accordingly, hope it helps!