Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

numpy save multiple arrays

import numpy as np

arr1 = np.arange(8).reshape(2, 4)
arr2 = np.arange(10).reshape(2, 5)
np.savez('mat.npz', name1=arr1, name2=arr2)

data = np.load('mat.npz')
print data['name1']
print data['name2']
 
PREVIOUS NEXT
Tagged: #numpy #save #multiple #arrays
ADD COMMENT
Topic
Name
4+6 =