9951 explained code solutions for 126 technologies


python-numpyHow to load Numpy array from file


Before loading array data from file, you should save Numpy array to file.

import numpy as np

array = np.load('/tmp/numpy.npy')ctrl + c
import numpy as np

load Numpy module for Python

array

will contain loaded array from file

.load

loads Numpy array from specified file

/tmp/numpy.npy

path to Numpy array file that was previously saved