3000 explained code solutions for 75 technologies

python-numpyHow to save array to file

import numpy as np

array = np.array([1,2,3])
np.save('/tmp/numpy', array)ctrl + c
import numpy as np

load Numpy module for Python


declare Numpy array


save array to file


path to file to save array to (file will have npy extension)


array to save to file