使用数组进行文件输入与输出

np.savenp.load是高效存取硬盘数据的两大工具函数。数组在默认情况下以压缩方式进行存储的,后缀名:.npy

1
2
np.save('some_array',arr)
np.load('some_array.npy')
Author: YihangBao
Link: https://roarboil.github.io/2019/09/04/arrayio/
Copyright Notice: All articles in this blog are licensed under CC BY-NC-SA 4.0 unless stating additionally.