import numpy as np
array = np.array([1,2,3])
np.save('/tmp/numpy', array)
import numpy as np
- load lib:Numpy module for Pythonnp.array
- declare Numpy array.save
- save array to file/tmp/numpy
- path to file to save array to (file will havenpy
extension)array
- array to save to file
group: file
import numpy as np
array = np.array([1,2,3])
np.save('/tmp/numpy', array)
import os
print(os.path.getsize("/tmp/numpy.npy"))
152
link_youtube: https://youtu.be/ZSz44oaFkU0