Saving and loading of Arrays

Other topics

Using numpy.save and numpy.load

np.save and np.load provide a easy to use framework for saving and loading of arbitrary sized numpy arrays:

import numpy as np

a = np.random.randint(10,size=(3,3))
np.save('arr', a)

a2 = np.load('arr.npy')
print a2

Contributors

Topic Id: 10891

Example Ids: 32613

This site is not affiliated with any of the contributors.