how to save a npy file in numpy code example Example: save numpy array x = np.arange(10) np.save(outfile, x)