原文:https://docs.scipy.org/doc/numpy/reference/routines.io.html
校对:(虚位以待)
load(文件[,mmap_mode,allow_pickle,...]) |
从.npy,.npz或pickled文件加载数组或腌制对象。 |
save(file,arr [,allow_pickle,fix_imports]) |
将数组以NumPy .npy格式保存到二进制文件。 |
savez(file,\ * args,\ * \ * kwds) |
将多个数组以未压缩的.npz格式保存到单个文件中。 |
savez_compressed(file,\ * args,\ * \ * kwds) |
将多个数组以压缩的.npz格式保存到单个文件中。 |
这些二进制文件类型的格式记录在http://docs.scipy.org/doc/numpy/neps/npy-format.html
loadtxt(fname [,dtype,comments,delimiter,...]) |
从文本文件加载数据。 |
savetxt(fname,X [,fmt,delimiter,newline,...]) |
将数组保存到文本文件。 |
genfromtxt(fname [,dtype,comments,...]) |
从文本文件加载数据,缺少值按指定处理。 |
fromregex(file,regexp,dtype) |
使用正则表达式解析从文本文件构造数组。 |
fromstring(string [,dtype,count,sep]) |
根据字符串中的原始二进制或文本数据初始化的新1-D数组。 |
ndarray.tofile(fid [,sep,format]) |
将数组作为文本或二进制(默认)写入文件。 |
ndarray.tolist() |
将数组返回为(可能是嵌套的)列表。 |
fromfile(file [,dtype,count,sep]) |
从文本或二进制文件中的数据构造数组。 |
ndarray.tofile(fid [,sep,format]) |
将数组作为文本或二进制(默认)写入文件。 |
array2string(a [,max_line_width,precision,...]) |
返回数组的字符串表示形式。 |
array_repr(arr [,max_line_width,precision,...]) |
返回数组的字符串表示形式。 |
array_str(a [,max_line_width,precision,...]) |
返回数组中数据的字符串表示形式。 |
memmap |
创建存储在磁盘上的二进制文件中的数组的内存映射。 |
set_printoptions([precision,threshold,...]) |
设置打印选项。 |
get_printoptions() |
返回当前打印选项。 |
set_string_function(f [,repr]) |
设置当漂亮打印数组时使用的Python函数。 |
binary_repr(num [,width]) |
返回输入号码的二进制表示为字符串。 |
base_repr(number [,base,padding]) |
返回给定基本系统中数字的字符串表示形式。 |
DataSource([destpath]) |
通用数据源文件(文件,http,ftp,...)。 |