Here an example:
import numpy as np randoms = np.random.randint(0, 20, 10000000) a = randoms.astype(np.int) b = randoms.astype(np.object) np.save('d:/dtype=int.npy', a) #39 mb np.save('d:/dtype=object.npy', b) #19 mb!
You can see that the file with dtype=object is about half the size. How come? I was under the impression that properly defined numpy dtypes are strictly better than object dtypes.