Reading and modification of npy files

npy files are used to store the data, graph, dtype, and other information needed to reconstruct the ndarray. Commonly used IO functions are: The load() and save() functions are the two main functions for reading and writing file array data. By default, the array is saved in a file with the extension .npy in uncompressed raw binary format.

1. First write a .npy file yourself, use the np.save('test.npy',dict) method python

import numpy as np
dict={
   
    
    'name':'typxxn','sex':'girl','lan':'python'

Guess you like

Origin blog.csdn.net/weixin_35770067/article/details/131481017