|
1 | | -# Input and output |
| 1 | +# 输入和输出 |
2 | 2 |
|
3 | | -## NumPy binary files (NPY, NPZ) |
| 3 | +## NumPy二进制文件(NPY,NPZ) |
4 | 4 |
|
5 | | -method | description |
| 5 | +方法 | 描述 |
6 | 6 | ---|--- |
7 | | -[load](https://numpy.org/devdocs/reference/generated/numpy.load.html#numpy.load)(file[, mmap_mode, allow_pickle, …]) | Load arrays or pickled objects from .npy, .npz or pickled files. |
8 | | -[save](https://numpy.org/devdocs/reference/generated/numpy.save.html#numpy.save)(file, arr[, allow_pickle, fix_imports]) | Save an array to a binary file in NumPy .npy format. |
9 | | -[savez](https://numpy.org/devdocs/reference/generated/numpy.savez.html#numpy.savez)(file, \*args, \*\*kwds) | Save several arrays into a single file in uncompressed .npz format. |
10 | | -[savez_compressed](https://numpy.org/devdocs/reference/generated/numpy.savez_compressed.html#numpy.savez_compressed)(file, \*args, \*\*kwds) | Save several arrays into a single file in compressed .npz format. |
| 7 | +[load](https://numpy.org/devdocs/reference/generated/numpy.load.html#numpy.load)(file[, mmap_mode, allow_pickle, …]) | 从.npy、.npz或pickle文件加载阵列或pickle对象。 |
| 8 | +[save](https://numpy.org/devdocs/reference/generated/numpy.save.html#numpy.save)(file, arr[, allow_pickle, fix_imports]) | 将数组保存为NumPy.npy格式的二进制文件。 |
| 9 | +[savez](https://numpy.org/devdocs/reference/generated/numpy.savez.html#numpy.savez)(file, \*args, \*\*kwds) | 将几个数组以未压缩的.npz格式保存到单个文件中。 |
| 10 | +[savez_compressed](https://numpy.org/devdocs/reference/generated/numpy.savez_compressed.html#numpy.savez_compressed)(file, \*args, \*\*kwds) | 以压缩的.npz格式将几个数组保存到单个文件中。 |
11 | 11 |
|
12 | | -The format of these binary file types is documented in |
| 12 | +有关这些二进制文件类型的格式,请参阅 |
13 | 13 | [``numpy.lib.format``](https://numpy.org/devdocs/reference/generated/numpy.lib.format.html#module-numpy.lib.format) |
14 | 14 |
|
15 | | -## Text files |
| 15 | +## 文本文件 |
16 | 16 |
|
17 | | -method | description |
| 17 | +方法 | 描述 |
18 | 18 | ---|--- |
19 | | -[loadtxt](https://numpy.org/devdocs/reference/generated/numpy.loadtxt.html#numpy.loadtxt)(fname[, dtype, comments, delimiter, …]) | Load data from a text file. |
20 | | -[savetxt](https://numpy.org/devdocs/reference/generated/numpy.savetxt.html#numpy.savetxt)(fname, X[, fmt, delimiter, newline, …]) | Save an array to a text file. |
21 | | -[genfromtxt](https://numpy.org/devdocs/reference/generated/numpy.genfromtxt.html#numpy.genfromtxt)(fname[, dtype, comments, …]) | Load data from a text file, with missing values handled as specified. |
22 | | -[fromregex](https://numpy.org/devdocs/reference/generated/numpy.fromregex.html#numpy.fromregex)(file, regexp, dtype[, encoding]) | Construct an array from a text file, using regular expression parsing. |
23 | | -[fromstring](https://numpy.org/devdocs/reference/generated/numpy.fromstring.html#numpy.fromstring)(string[, dtype, count, sep]) | A new 1-D array initialized from text data in a string. |
24 | | -[ndarray.tofile](https://numpy.org/devdocs/reference/generated/numpy.ndarray.tofile.html#numpy.ndarray.tofile)(fid[, sep, format]) | Write array to a file as text or binary (default). |
25 | | -[ndarray.tolist](https://numpy.org/devdocs/reference/generated/numpy.ndarray.tolist.html#numpy.ndarray.tolist)() | Return the array as an a.ndim-levels deep nested list of Python scalars. |
| 19 | +[loadtxt](https://numpy.org/devdocs/reference/generated/numpy.loadtxt.html#numpy.loadtxt)(fname[, dtype, comments, delimiter, …]) | 从文本文件加载数据。 |
| 20 | +[savetxt](https://numpy.org/devdocs/reference/generated/numpy.savetxt.html#numpy.savetxt)(fname, X[, fmt, delimiter, newline, …]) | 将数组保存到文本文件。 |
| 21 | +[genfromtxt](https://numpy.org/devdocs/reference/generated/numpy.genfromtxt.html#numpy.genfromtxt)(fname[, dtype, comments, …]) | 从文本文件加载数据,并按指定方式处理缺少的值。 |
| 22 | +[fromregex](https://numpy.org/devdocs/reference/generated/numpy.fromregex.html#numpy.fromregex)(file, regexp, dtype[, encoding]) | 使用正则表达式解析从文本文件构造数组。 |
| 23 | +[fromstring](https://numpy.org/devdocs/reference/generated/numpy.fromstring.html#numpy.fromstring)(string[, dtype, count, sep]) | 从字符串中的文本数据初始化的新一维数组。 |
| 24 | +[ndarray.tofile](https://numpy.org/devdocs/reference/generated/numpy.ndarray.tofile.html#numpy.ndarray.tofile)(fid[, sep, format]) | 将数组以文本或二进制形式写入文件(默认)。 |
| 25 | +[ndarray.tolist](https://numpy.org/devdocs/reference/generated/numpy.ndarray.tolist.html#numpy.ndarray.tolist)() | 以Python标量的a.ndim级深嵌套列表的形式返回数组。 |
26 | 26 |
|
27 | | -## Raw binary files |
| 27 | +## 原始二进制文件 |
28 | 28 |
|
29 | | -method | description |
| 29 | +方法 | 描述 |
30 | 30 | ---|--- |
31 | | -[fromfile](https://numpy.org/devdocs/reference/generated/numpy.fromfile.html#numpy.fromfile)(file[, dtype, count, sep, offset]) | Construct an array from data in a text or binary file. |
32 | | -[ndarray.tofile](https://numpy.org/devdocs/reference/generated/numpy.ndarray.tofile.html#numpy.ndarray.tofile)(fid[, sep, format]) | Write array to a file as text or binary (default). |
| 31 | +[fromfile](https://numpy.org/devdocs/reference/generated/numpy.fromfile.html#numpy.fromfile)(file[, dtype, count, sep, offset]) | 从文本或二进制文件中的数据构造数组。 |
| 32 | +[ndarray.tofile](https://numpy.org/devdocs/reference/generated/numpy.ndarray.tofile.html#numpy.ndarray.tofile)(fid[, sep, format]) | 将数组以文本或二进制形式写入文件(默认)。 |
33 | 33 |
|
34 | | -## String formatting |
| 34 | +## 字符串格式 |
35 | 35 |
|
36 | | -method | description |
| 36 | +方法 | 描述 |
37 | 37 | ---|--- |
38 | | -[array2string](https://numpy.org/devdocs/reference/generated/numpy.array2string.html#numpy.array2string)(a[, max_line_width, precision, …]) | Return a string representation of an array. |
39 | | -[array_repr](https://numpy.org/devdocs/reference/generated/numpy.array_repr.html#numpy.array_repr)(arr[, max_line_width, precision, …]) | Return the string representation of an array. |
40 | | -[array_str](https://numpy.org/devdocs/reference/generated/numpy.array_str.html#numpy.array_str)(a[, max_line_width, precision, …]) | Return a string representation of the data in an array. |
41 | | -[format_float_positional](https://numpy.org/devdocs/reference/generated/numpy.format_float_positional.html#numpy.format_float_positional)(x[, precision, …]) | Format a floating-point scalar as a decimal string in positional notation. |
42 | | -[format_float_scientific](https://numpy.org/devdocs/reference/generated/numpy.format_float_scientific.html#numpy.format_float_scientific)(x[, precision, …]) | Format a floating-point scalar as a decimal string in scientific notation. |
| 38 | +[array2string](https://numpy.org/devdocs/reference/generated/numpy.array2string.html#numpy.array2string)(a[, max_line_width, precision, …]) | 返回数组的字符串表示形式。 |
| 39 | +[array_repr](https://numpy.org/devdocs/reference/generated/numpy.array_repr.html#numpy.array_repr)(arr[, max_line_width, precision, …]) | 返回数组的字符串表示形式。 |
| 40 | +[array_str](https://numpy.org/devdocs/reference/generated/numpy.array_str.html#numpy.array_str)(a[, max_line_width, precision, …]) | 返回数组中数据的字符串表示形式。 |
| 41 | +[format_float_positional](https://numpy.org/devdocs/reference/generated/numpy.format_float_positional.html#numpy.format_float_positional)(x[, precision, …]) | 将浮点标量格式化为位置表示法中的十进制字符串。 |
| 42 | +[format_float_scientific](https://numpy.org/devdocs/reference/generated/numpy.format_float_scientific.html#numpy.format_float_scientific)(x[, precision, …]) | 将浮点标量格式化为科学记数法中的十进制字符串。 |
43 | 43 |
|
44 | | -## Memory mapping files |
| 44 | +## 内存映射文件 |
45 | 45 |
|
46 | | -method | description |
| 46 | +方法 | 描述 |
47 | 47 | ---|--- |
48 | | -[memmap](https://numpy.org/devdocs/reference/generated/numpy.memmap.html#numpy.memmap) | Create a memory-map to an array stored in a binary file on disk. |
| 48 | +[memmap](https://numpy.org/devdocs/reference/generated/numpy.memmap.html#numpy.memmap) | 创建存储在磁盘上二进制文件中的阵列的内存映射。 |
49 | 49 |
|
50 | | -## Text formatting options |
| 50 | +## 文本格式选项 |
51 | 51 |
|
52 | | -method | description |
| 52 | +方法 | 描述 |
53 | 53 | ---|--- |
54 | | -[set_printoptions](https://numpy.org/devdocs/reference/generated/numpy.set_printoptions.html#numpy.set_printoptions)([precision, threshold, …]) | Set printing options. |
55 | | -[get_printoptions](https://numpy.org/devdocs/reference/generated/numpy.get_printoptions.html#numpy.get_printoptions)() | Return the current print options. |
56 | | -[set_string_function](https://numpy.org/devdocs/reference/generated/numpy.set_string_function.html#numpy.set_string_function)(f[, repr]) | Set a Python function to be used when pretty printing arrays. |
57 | | -[printoptions](https://numpy.org/devdocs/reference/generated/numpy.printoptions.html#numpy.printoptions)(\\\*args, \\\*\\\*kwargs) | Context manager for setting print options. |
| 54 | +[set_printoptions](https://numpy.org/devdocs/reference/generated/numpy.set_printoptions.html#numpy.set_printoptions)([precision, threshold, …]) | 设置打印选项。 |
| 55 | +[get_printoptions](https://numpy.org/devdocs/reference/generated/numpy.get_printoptions.html#numpy.get_printoptions)() | 返回当前打印选项。 |
| 56 | +[set_string_function](https://numpy.org/devdocs/reference/generated/numpy.set_string_function.html#numpy.set_string_function)(f[, repr]) | 设置在更好的打印数组时要使用的Python函数。 |
| 57 | +[printoptions](https://numpy.org/devdocs/reference/generated/numpy.printoptions.html#numpy.printoptions)(\*args, \*\*kwargs) | 上下文管理器,用于设置打印选项。 |
58 | 58 |
|
59 | | -## Base-n representations |
| 59 | +## 基数n表示 |
60 | 60 |
|
61 | | -method | description |
| 61 | +方法 | 描述 |
62 | 62 | ---|--- |
63 | | -[binary_repr](https://numpy.org/devdocs/reference/generated/numpy.binary_repr.html#numpy.binary_repr)(num[, width]) | Return the binary representation of the input number as a string. |
64 | | -[base_repr](https://numpy.org/devdocs/reference/generated/numpy.base_repr.html#numpy.base_repr)(number[, base, padding]) | Return a string representation of a number in the given base system. |
| 63 | +[binary_repr](https://numpy.org/devdocs/reference/generated/numpy.binary_repr.html#numpy.binary_repr)(num[, width]) | 以字符串形式返回输入数字的二进制表示形式。 |
| 64 | +[base_repr](https://numpy.org/devdocs/reference/generated/numpy.base_repr.html#numpy.base_repr)(number[, base, padding]) | 返回给定基本系统中数字的字符串表示形式。 |
65 | 65 |
|
66 | | -## Data sources |
| 66 | +## 数据源 |
67 | 67 |
|
68 | | -method | description |
| 68 | +方法 | 描述 |
69 | 69 | ---|--- |
70 | | -[DataSource](https://numpy.org/devdocs/reference/generated/numpy.DataSource.html#numpy.DataSource)([destpath]) | A generic data source file (file, http, ftp, …). |
| 70 | +[DataSource](https://numpy.org/devdocs/reference/generated/numpy.DataSource.html#numpy.DataSource)([destpath]) | 通用数据源文件(file、http、ftp等)。 |
71 | 71 |
|
72 | | -## Binary Format Description |
| 72 | +## 二进制格式描述 |
73 | 73 |
|
74 | | -method | description |
| 74 | +方法 | 描述 |
75 | 75 | ---|--- |
76 | | -[lib.format](https://numpy.org/devdocs/reference/generated/numpy.lib.format.html#module-numpy.lib.format) | Binary serialization |
| 76 | +[lib.format](https://numpy.org/devdocs/reference/generated/numpy.lib.format.html#module-numpy.lib.format) | 二进制序列化 |
0 commit comments