4845 explained code solutions for 96 technologies

python-numpyHow to save multiple arrays to file

import numpy as np

a = np.array([1,2,3])
b = np.array([9,8,7])
np.savez('/tmp/numpies', a, b)ctrl + c
import numpy as np

load Numpy module for Python


declare Numpy array


save specified arrays to a file


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