Search
 
SCRIPT & CODE EXAMPLE
 

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']
Comment

PREVIOUS NEXT
Code Example
Python :: get subscriber count with python 
Python :: python json normalize 
Python :: python remove suffix 
Python :: check if point is inside polygon python 
Python :: python how to count all elements in a list 
Python :: how to make a resizable python tkinter window have a limit 
Python :: concatenate python 
Python :: how to generate random numbers in python 
Python :: convert ndarray to csr_matrix 
Python :: python code to exe file 
Python :: pygame size of image 
Python :: cd in python 
Python :: convert matplotlib figure to cv2 image 
Python :: writerows to existing csv python 
Python :: calculate mean on python 
Python :: plotly graph object colorscale 
Python :: Calculate Euclidean Distance in Python using distance.euclidean() 
Python :: sklearn support vector machine 
Python :: column type pandas as numpy array 
Python :: tab of nbextensions not showing in jupyter notebook 
Python :: python get all combinations of list 
Python :: push element to list python 
Python :: python list of dictionaries to excel 
Python :: remove character(s)from each column in dataframe 
Python :: python search first occurrence in string 
Python :: django now template tag 
Python :: python create venv 
Python :: types of dict comprehension 
Python :: python using numpy 
Python :: python sns lable axes 
ADD CONTENT
Topic
Content
Source link
Name
1+3 =