You can use the savez_compressed() function to save a Numpy array into a ".npz" file in compressed format. You can use the load() function to load the array from the compressed ".npz" file.
Here is an example:
>>> import numpy as np>>> a=np.array([[1,2],[3,4],[5,6]])>>> aarray([[1, 2], [3, 4], [5, 6]])>>> np.savez_compressed("testfile.npz", a=a)>>> v=np.load("testfile.npz")>>> v['a']array([[1, 2], [3, 4], [5, 6]])>>>