python3 dict ndarray 存成json,并保留原数据精度

import numpy as np import codecs, json a = np.arange(10).reshape(2,5) # a 2 by 5 array b = a.tolist() # nested lists with same data, indices file_path = "/path.json" ## your path variable json.dump(
相关文章
相关标签/搜索