Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Numpy
## Importing libraries to create arrays and save and load then using built in file functions
import numpy as np
x = np.zeros((2,2))
## using save function, save the created numpy array into the .npy filenp.save('outfile', x)
## loading the above saved .npy file
y = np.load('outfile.npy')
print (y)
#[Output]:
#[[0. 0.]
# [0. 0.]]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.