Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

Saving NumPy array to a File

# We create a rank 1 ndarray
x = np.array([1, 2, 3, 4, 5])

# We save x into the current directory as 
np.save('my_array', x)

# We load the saved array from our current directory into variable y
y = np.load('my_array.npy')
Source by classroom.udacity.com #
 
PREVIOUS NEXT
Tagged: #Saving #NumPy #array #File
ADD COMMENT
Topic
Name
7+4 =