This repository has been archived by the owner on May 6, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 40
/
routines.math.html
376 lines (374 loc) · 34.6 KB
/
routines.math.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
<h1><span class="yiyi-st" id="yiyi-23">Mathematical functions</span></h1>
<blockquote>
<p>原文:<a href="https://docs.scipy.org/doc/numpy/reference/routines.math.html">https://docs.scipy.org/doc/numpy/reference/routines.math.html</a></p>
<p>译者:<a href="https://github.com/wizardforcel">飞龙</a> <a href="http://usyiyi.cn/">UsyiyiCN</a></p>
<p>校对:(虚位以待)</p>
</blockquote>
<div class="section" id="trigonometric-functions">
<h2><span class="yiyi-st" id="yiyi-24">Trigonometric functions</span></h2>
<table border="1" class="longtable docutils">
<colgroup>
<col width="10%">
<col width="90%">
</colgroup>
<tbody valign="top">
<tr class="row-odd"><td><span class="yiyi-st" id="yiyi-25"><a class="reference internal" href="generated/numpy.sin.html#numpy.sin" title="numpy.sin"><code class="xref py py-obj docutils literal"><span class="pre">sin</span></code></a>(x [,out])</span></td>
<td><span class="yiyi-st" id="yiyi-26">三角正弦,元素。</span></td>
</tr>
<tr class="row-even"><td><span class="yiyi-st" id="yiyi-27"><a class="reference internal" href="generated/numpy.cos.html#numpy.cos" title="numpy.cos"><code class="xref py py-obj docutils literal"><span class="pre">cos</span></code></a>(x [,out])</span></td>
<td><span class="yiyi-st" id="yiyi-28">元素方面。</span></td>
</tr>
<tr class="row-odd"><td><span class="yiyi-st" id="yiyi-29"><a class="reference internal" href="generated/numpy.tan.html#numpy.tan" title="numpy.tan"><code class="xref py py-obj docutils literal"><span class="pre">tan</span></code></a>(x [,out])</span></td>
<td><span class="yiyi-st" id="yiyi-30">逐元素计算切线。</span></td>
</tr>
<tr class="row-even"><td><span class="yiyi-st" id="yiyi-31"><a class="reference internal" href="generated/numpy.arcsin.html#numpy.arcsin" title="numpy.arcsin"><code class="xref py py-obj docutils literal"><span class="pre">arcsin</span></code></a>(x [,out])</span></td>
<td><span class="yiyi-st" id="yiyi-32">反正弦,元素。</span></td>
</tr>
<tr class="row-odd"><td><span class="yiyi-st" id="yiyi-33"><a class="reference internal" href="generated/numpy.arccos.html#numpy.arccos" title="numpy.arccos"><code class="xref py py-obj docutils literal"><span class="pre">arccos</span></code></a>(x [,out])</span></td>
<td><span class="yiyi-st" id="yiyi-34">三角反余弦,元素方式。</span></td>
</tr>
<tr class="row-even"><td><span class="yiyi-st" id="yiyi-35"><a class="reference internal" href="generated/numpy.arctan.html#numpy.arctan" title="numpy.arctan"><code class="xref py py-obj docutils literal"><span class="pre">arctan</span></code></a>(x [,out])</span></td>
<td><span class="yiyi-st" id="yiyi-36">三角反正切,元素。</span></td>
</tr>
<tr class="row-odd"><td><span class="yiyi-st" id="yiyi-37"><a class="reference internal" href="generated/numpy.hypot.html#numpy.hypot" title="numpy.hypot"><code class="xref py py-obj docutils literal"><span class="pre">hypot</span></code></a>(x1,x2 [,out])</span></td>
<td><span class="yiyi-st" id="yiyi-38">给定直角三角形的“腿”,返回其斜边。</span></td>
</tr>
<tr class="row-even"><td><span class="yiyi-st" id="yiyi-39"><a class="reference internal" href="generated/numpy.arctan2.html#numpy.arctan2" title="numpy.arctan2"><code class="xref py py-obj docutils literal"><span class="pre">arctan2</span></code></a>(x1,x2 [,out])</span></td>
<td><span class="yiyi-st" id="yiyi-40"><code class="docutils literal"><span class="pre">x1/x2</span></code>的元素平方倒圆切线正确选择象限。</span></td>
</tr>
<tr class="row-odd"><td><span class="yiyi-st" id="yiyi-41"><a class="reference internal" href="generated/numpy.degrees.html#numpy.degrees" title="numpy.degrees"><code class="xref py py-obj docutils literal"><span class="pre">degrees</span></code></a>(x [,out])</span></td>
<td><span class="yiyi-st" id="yiyi-42">将角度从弧度转换为度。</span></td>
</tr>
<tr class="row-even"><td><span class="yiyi-st" id="yiyi-43"><a class="reference internal" href="generated/numpy.radians.html#numpy.radians" title="numpy.radians"><code class="xref py py-obj docutils literal"><span class="pre">radians</span></code></a>(x [,out])</span></td>
<td><span class="yiyi-st" id="yiyi-44">将角度从度转换为弧度。</span></td>
</tr>
<tr class="row-odd"><td><span class="yiyi-st" id="yiyi-45"><a class="reference internal" href="generated/numpy.unwrap.html#numpy.unwrap" title="numpy.unwrap"><code class="xref py py-obj docutils literal"><span class="pre">unwrap</span></code></a>(p [,discont,axis])</span></td>
<td><span class="yiyi-st" id="yiyi-46">通过将值之间的delta改为2 * pi补码来展开。</span></td>
</tr>
<tr class="row-even"><td><span class="yiyi-st" id="yiyi-47"><a class="reference internal" href="generated/numpy.deg2rad.html#numpy.deg2rad" title="numpy.deg2rad"><code class="xref py py-obj docutils literal"><span class="pre">deg2rad</span></code></a>(x [,out])</span></td>
<td><span class="yiyi-st" id="yiyi-48">将角度从度转换为弧度。</span></td>
</tr>
<tr class="row-odd"><td><span class="yiyi-st" id="yiyi-49"><a class="reference internal" href="generated/numpy.rad2deg.html#numpy.rad2deg" title="numpy.rad2deg"><code class="xref py py-obj docutils literal"><span class="pre">rad2deg</span></code></a>(x [,out])</span></td>
<td><span class="yiyi-st" id="yiyi-50">将角度从弧度转换为度。</span></td>
</tr>
</tbody>
</table>
</div>
<div class="section" id="hyperbolic-functions">
<h2><span class="yiyi-st" id="yiyi-51">Hyperbolic functions</span></h2>
<table border="1" class="longtable docutils">
<colgroup>
<col width="10%">
<col width="90%">
</colgroup>
<tbody valign="top">
<tr class="row-odd"><td><span class="yiyi-st" id="yiyi-52"><a class="reference internal" href="generated/numpy.sinh.html#numpy.sinh" title="numpy.sinh"><code class="xref py py-obj docutils literal"><span class="pre">sinh</span></code></a>(x [,out])</span></td>
<td><span class="yiyi-st" id="yiyi-53">双曲正弦,元素。</span></td>
</tr>
<tr class="row-even"><td><span class="yiyi-st" id="yiyi-54"><a class="reference internal" href="generated/numpy.cosh.html#numpy.cosh" title="numpy.cosh"><code class="xref py py-obj docutils literal"><span class="pre">cosh</span></code></a>(x [,out])</span></td>
<td><span class="yiyi-st" id="yiyi-55">双曲余弦,元素。</span></td>
</tr>
<tr class="row-odd"><td><span class="yiyi-st" id="yiyi-56"><a class="reference internal" href="generated/numpy.tanh.html#numpy.tanh" title="numpy.tanh"><code class="xref py py-obj docutils literal"><span class="pre">tanh</span></code></a>(x[, out])</span></td>
<td><span class="yiyi-st" id="yiyi-57">逐元素计算双曲正切。</span></td>
</tr>
<tr class="row-even"><td><span class="yiyi-st" id="yiyi-58"><a class="reference internal" href="generated/numpy.arcsinh.html#numpy.arcsinh" title="numpy.arcsinh"><code class="xref py py-obj docutils literal"><span class="pre">arcsinh</span></code></a>(x [,out])</span></td>
<td><span class="yiyi-st" id="yiyi-59">逆双曲正弦元。</span></td>
</tr>
<tr class="row-odd"><td><span class="yiyi-st" id="yiyi-60"><a class="reference internal" href="generated/numpy.arccosh.html#numpy.arccosh" title="numpy.arccosh"><code class="xref py py-obj docutils literal"><span class="pre">arccosh</span></code></a>(x [,out])</span></td>
<td><span class="yiyi-st" id="yiyi-61">逆双曲余弦,元素方式。</span></td>
</tr>
<tr class="row-even"><td><span class="yiyi-st" id="yiyi-62"><a class="reference internal" href="generated/numpy.arctanh.html#numpy.arctanh" title="numpy.arctanh"><code class="xref py py-obj docutils literal"><span class="pre">arctanh</span></code></a>(x [,out])</span></td>
<td><span class="yiyi-st" id="yiyi-63">逆双曲正切元素。</span></td>
</tr>
</tbody>
</table>
</div>
<div class="section" id="rounding">
<h2><span class="yiyi-st" id="yiyi-64">Rounding</span></h2>
<table border="1" class="longtable docutils">
<colgroup>
<col width="10%">
<col width="90%">
</colgroup>
<tbody valign="top">
<tr class="row-odd"><td><span class="yiyi-st" id="yiyi-65"><a class="reference internal" href="generated/numpy.around.html#numpy.around" title="numpy.around"><code class="xref py py-obj docutils literal"><span class="pre">around</span></code></a>(a [,decimals,out])</span></td>
<td><span class="yiyi-st" id="yiyi-66">均匀到给定的小数位数。</span></td>
</tr>
<tr class="row-even"><td><span class="yiyi-st" id="yiyi-67"><a class="reference internal" href="generated/numpy.round_.html#numpy.round_" title="numpy.round_"><code class="xref py py-obj docutils literal"><span class="pre">round_</span></code></a>(a [,decimals,out])</span></td>
<td><span class="yiyi-st" id="yiyi-68">将数组舍入到给定的小数位数。</span></td>
</tr>
<tr class="row-odd"><td><span class="yiyi-st" id="yiyi-69"><a class="reference internal" href="generated/numpy.rint.html#numpy.rint" title="numpy.rint"><code class="xref py py-obj docutils literal"><span class="pre">rint</span></code></a>(x [,out])</span></td>
<td><span class="yiyi-st" id="yiyi-70">数组的圆形元素到最接近的整数。</span></td>
</tr>
<tr class="row-even"><td><span class="yiyi-st" id="yiyi-71"><a class="reference internal" href="generated/numpy.fix.html#numpy.fix" title="numpy.fix"><code class="xref py py-obj docutils literal"><span class="pre">fix</span></code></a>(x [,y])</span></td>
<td><span class="yiyi-st" id="yiyi-72">向零舍入到最接近的整数。</span></td>
</tr>
<tr class="row-odd"><td><span class="yiyi-st" id="yiyi-73"><a class="reference internal" href="generated/numpy.floor.html#numpy.floor" title="numpy.floor"><code class="xref py py-obj docutils literal"><span class="pre">floor</span></code></a>(x [,out])</span></td>
<td><span class="yiyi-st" id="yiyi-74">逐元素地返回输入的底。</span></td>
</tr>
<tr class="row-even"><td><span class="yiyi-st" id="yiyi-75"><a class="reference internal" href="generated/numpy.ceil.html#numpy.ceil" title="numpy.ceil"><code class="xref py py-obj docutils literal"><span class="pre">ceil</span></code></a>(x [,out])</span></td>
<td><span class="yiyi-st" id="yiyi-76">元素方式返回输入的上限。</span></td>
</tr>
<tr class="row-odd"><td><span class="yiyi-st" id="yiyi-77"><a class="reference internal" href="generated/numpy.trunc.html#numpy.trunc" title="numpy.trunc"><code class="xref py py-obj docutils literal"><span class="pre">trunc</span></code></a>(x [,out])</span></td>
<td><span class="yiyi-st" id="yiyi-78">按元素方式返回输入的截断值。</span></td>
</tr>
</tbody>
</table>
</div>
<div class="section" id="sums-products-differences">
<h2><span class="yiyi-st" id="yiyi-79">Sums, products, differences</span></h2>
<table border="1" class="longtable docutils">
<colgroup>
<col width="10%">
<col width="90%">
</colgroup>
<tbody valign="top">
<tr class="row-odd"><td><span class="yiyi-st" id="yiyi-80"><a class="reference internal" href="generated/numpy.prod.html#numpy.prod" title="numpy.prod"><code class="xref py py-obj docutils literal"><span class="pre">prod</span></code></a>(a [,axis,dtype,out,keepdims])</span></td>
<td><span class="yiyi-st" id="yiyi-81">返回给定轴上的数组元素的乘积。</span></td>
</tr>
<tr class="row-even"><td><span class="yiyi-st" id="yiyi-82"><a class="reference internal" href="generated/numpy.sum.html#numpy.sum" title="numpy.sum"><code class="xref py py-obj docutils literal"><span class="pre">sum</span></code></a>(a [,axis,dtype,out,keepdims])</span></td>
<td><span class="yiyi-st" id="yiyi-83">给定轴上的数组元素的总和。</span></td>
</tr>
<tr class="row-odd"><td><span class="yiyi-st" id="yiyi-84"><a class="reference internal" href="generated/numpy.nanprod.html#numpy.nanprod" title="numpy.nanprod"><code class="xref py py-obj docutils literal"><span class="pre">nanprod</span></code></a>(a [,axis,dtype,out,keepdims])</span></td>
<td><span class="yiyi-st" id="yiyi-85">返回数组元素在给定轴上的处理非数字(NaN)为零的乘积。</span></td>
</tr>
<tr class="row-even"><td><span class="yiyi-st" id="yiyi-86"><a class="reference internal" href="generated/numpy.nansum.html#numpy.nansum" title="numpy.nansum"><code class="xref py py-obj docutils literal"><span class="pre">nansum</span></code></a>(a [,axis,dtype,out,keepdims])</span></td>
<td><span class="yiyi-st" id="yiyi-87">返回在给定轴上处理非数字(NaN)为零的数组元素的总和。</span></td>
</tr>
<tr class="row-odd"><td><span class="yiyi-st" id="yiyi-88"><a class="reference internal" href="generated/numpy.cumprod.html#numpy.cumprod" title="numpy.cumprod"><code class="xref py py-obj docutils literal"><span class="pre">cumprod</span></code></a>(a [,axis,dtype,out])</span></td>
<td><span class="yiyi-st" id="yiyi-89">返回沿给定轴的元素的累积积。</span></td>
</tr>
<tr class="row-even"><td><span class="yiyi-st" id="yiyi-90"><a class="reference internal" href="generated/numpy.cumsum.html#numpy.cumsum" title="numpy.cumsum"><code class="xref py py-obj docutils literal"><span class="pre">cumsum</span></code></a>(a [,axis,dtype,out])</span></td>
<td><span class="yiyi-st" id="yiyi-91">返回沿给定轴的元素的累积和。</span></td>
</tr>
<tr class="row-odd"><td><span class="yiyi-st" id="yiyi-92"><code class="xref py py-obj docutils literal"><span class="pre">nancumprod</span></code></span></td>
<td></td>
</tr>
<tr class="row-even"><td><span class="yiyi-st" id="yiyi-93"><code class="xref py py-obj docutils literal"><span class="pre">nancumsum</span></code></span></td>
<td></td>
</tr>
<tr class="row-odd"><td><span class="yiyi-st" id="yiyi-94"><a class="reference internal" href="generated/numpy.diff.html#numpy.diff" title="numpy.diff"><code class="xref py py-obj docutils literal"><span class="pre">diff</span></code></a>(a [,n,axis])</span></td>
<td><span class="yiyi-st" id="yiyi-95">计算沿给定轴的第n个离散差分。</span></td>
</tr>
<tr class="row-even"><td><span class="yiyi-st" id="yiyi-96"><a class="reference internal" href="generated/numpy.ediff1d.html#numpy.ediff1d" title="numpy.ediff1d"><code class="xref py py-obj docutils literal"><span class="pre">ediff1d</span></code></a>(ary [,to_end,to_begin])</span></td>
<td><span class="yiyi-st" id="yiyi-97">数组的连续元素之间的差异。</span></td>
</tr>
<tr class="row-odd"><td><span class="yiyi-st" id="yiyi-98"><a class="reference internal" href="generated/numpy.gradient.html#numpy.gradient" title="numpy.gradient"><code class="xref py py-obj docutils literal"><span class="pre">gradient</span></code></a>(f,\ * varargs,\ * \ * kwargs)</span></td>
<td><span class="yiyi-st" id="yiyi-99">返回N维数组的梯度。</span></td>
</tr>
<tr class="row-even"><td><span class="yiyi-st" id="yiyi-100"><a class="reference internal" href="generated/numpy.cross.html#numpy.cross" title="numpy.cross"><code class="xref py py-obj docutils literal"><span class="pre">cross</span></code></a>(a,b [,axisa,axisb,axisc,axis])</span></td>
<td><span class="yiyi-st" id="yiyi-101">返回两个(数组)向量的叉积。</span></td>
</tr>
<tr class="row-odd"><td><span class="yiyi-st" id="yiyi-102"><a class="reference internal" href="generated/numpy.trapz.html#numpy.trapz" title="numpy.trapz"><code class="xref py py-obj docutils literal"><span class="pre">trapz</span></code></a>(y [,x,dx,axis])</span></td>
<td><span class="yiyi-st" id="yiyi-103">使用复合梯形法则沿给定轴进行积分。</span></td>
</tr>
</tbody>
</table>
</div>
<div class="section" id="exponents-and-logarithms">
<h2><span class="yiyi-st" id="yiyi-104">Exponents and logarithms</span></h2>
<table border="1" class="longtable docutils">
<colgroup>
<col width="10%">
<col width="90%">
</colgroup>
<tbody valign="top">
<tr class="row-odd"><td><span class="yiyi-st" id="yiyi-105"><a class="reference internal" href="generated/numpy.exp.html#numpy.exp" title="numpy.exp"><code class="xref py py-obj docutils literal"><span class="pre">exp</span></code></a>(x [,out])</span></td>
<td><span class="yiyi-st" id="yiyi-106">计算输入数组中所有元素的指数。</span></td>
</tr>
<tr class="row-even"><td><span class="yiyi-st" id="yiyi-107"><a class="reference internal" href="generated/numpy.expm1.html#numpy.expm1" title="numpy.expm1"><code class="xref py py-obj docutils literal"><span class="pre">expm1</span></code></a>(x [,out])</span></td>
<td><span class="yiyi-st" id="yiyi-108">对数组中的所有元素计算<code class="docutils literal"><span class="pre">exp(x)</span> <span class="pre"> - </span> <span class="pre">1</span> </code></span></td>
</tr>
<tr class="row-odd"><td><span class="yiyi-st" id="yiyi-109"><a class="reference internal" href="generated/numpy.exp2.html#numpy.exp2" title="numpy.exp2"><code class="xref py py-obj docutils literal"><span class="pre">exp2</span></code></a>(x [,out])</span></td>
<td><span class="yiyi-st" id="yiyi-110">对于输入数组中的所有<em class="xref py py-obj">p</em>,计算<em class="xref py py-obj">2 ** p</em>。</span></td>
</tr>
<tr class="row-even"><td><span class="yiyi-st" id="yiyi-111"><a class="reference internal" href="generated/numpy.log.html#numpy.log" title="numpy.log"><code class="xref py py-obj docutils literal"><span class="pre">log</span></code></a>(x [,out])</span></td>
<td><span class="yiyi-st" id="yiyi-112">自然对数,逐元素。</span></td>
</tr>
<tr class="row-odd"><td><span class="yiyi-st" id="yiyi-113"><a class="reference internal" href="generated/numpy.log10.html#numpy.log10" title="numpy.log10"><code class="xref py py-obj docutils literal"><span class="pre">log10</span></code></a>(x [,out])</span></td>
<td><span class="yiyi-st" id="yiyi-114">以元素为单位返回输入数组的基数10的对数。</span></td>
</tr>
<tr class="row-even"><td><span class="yiyi-st" id="yiyi-115"><a class="reference internal" href="generated/numpy.log2.html#numpy.log2" title="numpy.log2"><code class="xref py py-obj docutils literal"><span class="pre">log2</span></code></a>(x [,out])</span></td>
<td><span class="yiyi-st" id="yiyi-116"><em class="xref py py-obj">x</em>的基础2对数。</span></td>
</tr>
<tr class="row-odd"><td><span class="yiyi-st" id="yiyi-117"><a class="reference internal" href="generated/numpy.log1p.html#numpy.log1p" title="numpy.log1p"><code class="xref py py-obj docutils literal"><span class="pre">log1p</span></code></a>(x [,out])</span></td>
<td><span class="yiyi-st" id="yiyi-118">返回一个加自然对数的输入数组,元素。</span></td>
</tr>
<tr class="row-even"><td><span class="yiyi-st" id="yiyi-119"><a class="reference internal" href="generated/numpy.logaddexp.html#numpy.logaddexp" title="numpy.logaddexp"><code class="xref py py-obj docutils literal"><span class="pre">logaddexp</span></code></a>(x1,x2 [,out])</span></td>
<td><span class="yiyi-st" id="yiyi-120">输入的求和的对数。</span></td>
</tr>
<tr class="row-odd"><td><span class="yiyi-st" id="yiyi-121"><a class="reference internal" href="generated/numpy.logaddexp2.html#numpy.logaddexp2" title="numpy.logaddexp2"><code class="xref py py-obj docutils literal"><span class="pre">logaddexp2</span></code></a>(x1,x2 [,out])</span></td>
<td><span class="yiyi-st" id="yiyi-122">以2为底的输入的乘方和的对数。</span></td>
</tr>
</tbody>
</table>
</div>
<div class="section" id="other-special-functions">
<h2><span class="yiyi-st" id="yiyi-123">Other special functions</span></h2>
<table border="1" class="longtable docutils">
<colgroup>
<col width="10%">
<col width="90%">
</colgroup>
<tbody valign="top">
<tr class="row-odd"><td><span class="yiyi-st" id="yiyi-124"><a class="reference internal" href="generated/numpy.i0.html#numpy.i0" title="numpy.i0"><code class="xref py py-obj docutils literal"><span class="pre">i0</span></code></a>(x)</span></td>
<td><span class="yiyi-st" id="yiyi-125">修改Bessel函数的第一类,顺序为0。</span></td>
</tr>
<tr class="row-even"><td><span class="yiyi-st" id="yiyi-126"><a class="reference internal" href="generated/numpy.sinc.html#numpy.sinc" title="numpy.sinc"><code class="xref py py-obj docutils literal"><span class="pre">sinc</span></code></a>(x)</span></td>
<td><span class="yiyi-st" id="yiyi-127">返回sinc函数。</span></td>
</tr>
</tbody>
</table>
</div>
<div class="section" id="floating-point-routines">
<h2><span class="yiyi-st" id="yiyi-128">Floating point routines</span></h2>
<table border="1" class="longtable docutils">
<colgroup>
<col width="10%">
<col width="90%">
</colgroup>
<tbody valign="top">
<tr class="row-odd"><td><span class="yiyi-st" id="yiyi-129"><a class="reference internal" href="generated/numpy.signbit.html#numpy.signbit" title="numpy.signbit"><code class="xref py py-obj docutils literal"><span class="pre">signbit</span></code></a>(x [,out])</span></td>
<td><span class="yiyi-st" id="yiyi-130">以元素为单位返回True,其中signbit已设置(小于零)。</span></td>
</tr>
<tr class="row-even"><td><span class="yiyi-st" id="yiyi-131"><a class="reference internal" href="generated/numpy.copysign.html#numpy.copysign" title="numpy.copysign"><code class="xref py py-obj docutils literal"><span class="pre">copysign</span></code></a>(x1,x2 [,out])</span></td>
<td><span class="yiyi-st" id="yiyi-132">按照元素方式将x1的符号更改为x2的符号。</span></td>
</tr>
<tr class="row-odd"><td><span class="yiyi-st" id="yiyi-133"><a class="reference internal" href="generated/numpy.frexp.html#numpy.frexp" title="numpy.frexp"><code class="xref py py-obj docutils literal"><span class="pre">frexp</span></code></a>(x [,out1,out2])</span></td>
<td><span class="yiyi-st" id="yiyi-134">将x的元素分解为尾数和二进制指数。</span></td>
</tr>
<tr class="row-even"><td><span class="yiyi-st" id="yiyi-135"><a class="reference internal" href="generated/numpy.ldexp.html#numpy.ldexp" title="numpy.ldexp"><code class="xref py py-obj docutils literal"><span class="pre">ldexp</span></code></a>(x1,x2 [,out])</span></td>
<td><span class="yiyi-st" id="yiyi-136">元素方式返回x1 * 2 ** x2。</span></td>
</tr>
</tbody>
</table>
</div>
<div class="section" id="arithmetic-operations">
<h2><span class="yiyi-st" id="yiyi-137">Arithmetic operations</span></h2>
<table border="1" class="longtable docutils">
<colgroup>
<col width="10%">
<col width="90%">
</colgroup>
<tbody valign="top">
<tr class="row-odd"><td><span class="yiyi-st" id="yiyi-138"><a class="reference internal" href="generated/numpy.add.html#numpy.add" title="numpy.add"><code class="xref py py-obj docutils literal"><span class="pre">add</span></code></a>(x1,x2 [,out])</span></td>
<td><span class="yiyi-st" id="yiyi-139">按元素添加参数。</span></td>
</tr>
<tr class="row-even"><td><span class="yiyi-st" id="yiyi-140"><a class="reference internal" href="generated/numpy.reciprocal.html#numpy.reciprocal" title="numpy.reciprocal"><code class="xref py py-obj docutils literal"><span class="pre">reciprocal</span></code></a>(x [,out])</span></td>
<td><span class="yiyi-st" id="yiyi-141">元素方式返回参数的倒数。</span></td>
</tr>
<tr class="row-odd"><td><span class="yiyi-st" id="yiyi-142"><a class="reference internal" href="generated/numpy.negative.html#numpy.negative" title="numpy.negative"><code class="xref py py-obj docutils literal"><span class="pre">negative</span></code></a>(x [,out])</span></td>
<td><span class="yiyi-st" id="yiyi-143">数值负,元素。</span></td>
</tr>
<tr class="row-even"><td><span class="yiyi-st" id="yiyi-144"><a class="reference internal" href="generated/numpy.multiply.html#numpy.multiply" title="numpy.multiply"><code class="xref py py-obj docutils literal"><span class="pre">multiply</span></code></a>(x1,x2 [,out])</span></td>
<td><span class="yiyi-st" id="yiyi-145">逐元素乘法参数。</span></td>
</tr>
<tr class="row-odd"><td><span class="yiyi-st" id="yiyi-146"><a class="reference internal" href="generated/numpy.divide.html#numpy.divide" title="numpy.divide"><code class="xref py py-obj docutils literal"><span class="pre">divide</span></code></a>(x1,x2 [,out])</span></td>
<td><span class="yiyi-st" id="yiyi-147">逐元素分割参数。</span></td>
</tr>
<tr class="row-even"><td><span class="yiyi-st" id="yiyi-148"><a class="reference internal" href="generated/numpy.power.html#numpy.power" title="numpy.power"><code class="xref py py-obj docutils literal"><span class="pre">power</span></code></a>(x1,x2 [,out])</span></td>
<td><span class="yiyi-st" id="yiyi-149">第一个数组元素从第二个数组提升到权力,逐元素。</span></td>
</tr>
<tr class="row-odd"><td><span class="yiyi-st" id="yiyi-150"><a class="reference internal" href="generated/numpy.subtract.html#numpy.subtract" title="numpy.subtract"><code class="xref py py-obj docutils literal"><span class="pre">subtract</span></code></a>(x1,x2 [,out])</span></td>
<td><span class="yiyi-st" id="yiyi-151">按元素方式减去参数。</span></td>
</tr>
<tr class="row-even"><td><span class="yiyi-st" id="yiyi-152"><a class="reference internal" href="generated/numpy.true_divide.html#numpy.true_divide" title="numpy.true_divide"><code class="xref py py-obj docutils literal"><span class="pre">true_divide</span></code></a>(x1,x2 [,out])</span></td>
<td><span class="yiyi-st" id="yiyi-153">按元素方式返回输入的真正除法。</span></td>
</tr>
<tr class="row-odd"><td><span class="yiyi-st" id="yiyi-154"><a class="reference internal" href="generated/numpy.floor_divide.html#numpy.floor_divide" title="numpy.floor_divide"><code class="xref py py-obj docutils literal"><span class="pre">floor_divide</span></code></a>(x1,x2 [,out])</span></td>
<td><span class="yiyi-st" id="yiyi-155">返回小于或等于输入的除法的最大整数。</span></td>
</tr>
<tr class="row-even"><td><span class="yiyi-st" id="yiyi-156"><a class="reference internal" href="generated/numpy.fmod.html#numpy.fmod" title="numpy.fmod"><code class="xref py py-obj docutils literal"><span class="pre">fmod</span></code></a>(x1,x2 [,out])</span></td>
<td><span class="yiyi-st" id="yiyi-157">返回除法的元素余项。</span></td>
</tr>
<tr class="row-odd"><td><span class="yiyi-st" id="yiyi-158"><a class="reference internal" href="generated/numpy.mod.html#numpy.mod" title="numpy.mod"><code class="xref py py-obj docutils literal"><span class="pre">mod</span></code></a>(x1,x2 [,out])</span></td>
<td><span class="yiyi-st" id="yiyi-159">返回元素的除法余数。</span></td>
</tr>
<tr class="row-even"><td><span class="yiyi-st" id="yiyi-160"><a class="reference internal" href="generated/numpy.modf.html#numpy.modf" title="numpy.modf"><code class="xref py py-obj docutils literal"><span class="pre">modf</span></code></a>(x [,out1,out2])</span></td>
<td><span class="yiyi-st" id="yiyi-161">以元素方式返回数组的小数和整数部分。</span></td>
</tr>
<tr class="row-odd"><td><span class="yiyi-st" id="yiyi-162"><a class="reference internal" href="generated/numpy.remainder.html#numpy.remainder" title="numpy.remainder"><code class="xref py py-obj docutils literal"><span class="pre">remainder</span></code></a>(x1,x2 [,out])</span></td>
<td><span class="yiyi-st" id="yiyi-163">返回元素的除法余数。</span></td>
</tr>
</tbody>
</table>
</div>
<div class="section" id="handling-complex-numbers">
<h2><span class="yiyi-st" id="yiyi-164">Handling complex numbers</span></h2>
<table border="1" class="longtable docutils">
<colgroup>
<col width="10%">
<col width="90%">
</colgroup>
<tbody valign="top">
<tr class="row-odd"><td><span class="yiyi-st" id="yiyi-165"><a class="reference internal" href="generated/numpy.angle.html#numpy.angle" title="numpy.angle"><code class="xref py py-obj docutils literal"><span class="pre">angle</span></code></a>(z [,deg])</span></td>
<td><span class="yiyi-st" id="yiyi-166">返回复参数的角度。</span></td>
</tr>
<tr class="row-even"><td><span class="yiyi-st" id="yiyi-167"><a class="reference internal" href="generated/numpy.real.html#numpy.real" title="numpy.real"><code class="xref py py-obj docutils literal"><span class="pre">real</span></code></a>(val)</span></td>
<td><span class="yiyi-st" id="yiyi-168">返回数组的元素的实数部分。</span></td>
</tr>
<tr class="row-odd"><td><span class="yiyi-st" id="yiyi-169"><a class="reference internal" href="generated/numpy.imag.html#numpy.imag" title="numpy.imag"><code class="xref py py-obj docutils literal"><span class="pre">imag</span></code></a>(val)</span></td>
<td><span class="yiyi-st" id="yiyi-170">返回数组的元素的虚部。</span></td>
</tr>
<tr class="row-even"><td><span class="yiyi-st" id="yiyi-171"><a class="reference internal" href="generated/numpy.conj.html#numpy.conj" title="numpy.conj"><code class="xref py py-obj docutils literal"><span class="pre">conj</span></code></a>(x [,out])</span></td>
<td><span class="yiyi-st" id="yiyi-172">按元素方式返回复共轭。</span></td>
</tr>
</tbody>
</table>
</div>
<div class="section" id="miscellaneous">
<h2><span class="yiyi-st" id="yiyi-173">Miscellaneous</span></h2>
<table border="1" class="longtable docutils">
<colgroup>
<col width="10%">
<col width="90%">
</colgroup>
<tbody valign="top">
<tr class="row-odd"><td><span class="yiyi-st" id="yiyi-174"><a class="reference internal" href="generated/numpy.convolve.html#numpy.convolve" title="numpy.convolve"><code class="xref py py-obj docutils literal"><span class="pre">convolve</span></code></a>(a,v [,mode])</span></td>
<td><span class="yiyi-st" id="yiyi-175">返回两个一维序列的离散,线性卷积。</span></td>
</tr>
<tr class="row-even"><td><span class="yiyi-st" id="yiyi-176"><a class="reference internal" href="generated/numpy.clip.html#numpy.clip" title="numpy.clip"><code class="xref py py-obj docutils literal"><span class="pre">clip</span></code></a>(a,a_min,a_max [,out])</span></td>
<td><span class="yiyi-st" id="yiyi-177">剪辑(限制)数组中的值。</span></td>
</tr>
<tr class="row-odd"><td><span class="yiyi-st" id="yiyi-178"><a class="reference internal" href="generated/numpy.sqrt.html#numpy.sqrt" title="numpy.sqrt"><code class="xref py py-obj docutils literal"><span class="pre">sqrt</span></code></a>(x [,out])</span></td>
<td><span class="yiyi-st" id="yiyi-179">按元素方式返回数组的正平方根。</span></td>
</tr>
<tr class="row-even"><td><span class="yiyi-st" id="yiyi-180"><a class="reference internal" href="generated/numpy.cbrt.html#numpy.cbrt" title="numpy.cbrt"><code class="xref py py-obj docutils literal"><span class="pre">cbrt</span></code></a>(x [,out])</span></td>
<td><span class="yiyi-st" id="yiyi-181">以元素方式返回数组的多维数据集根。</span></td>
</tr>
<tr class="row-odd"><td><span class="yiyi-st" id="yiyi-182"><a class="reference internal" href="generated/numpy.square.html#numpy.square" title="numpy.square"><code class="xref py py-obj docutils literal"><span class="pre">square</span></code></a>(x [,out])</span></td>
<td><span class="yiyi-st" id="yiyi-183">返回输入的元素平方。</span></td>
</tr>
<tr class="row-even"><td><span class="yiyi-st" id="yiyi-184"><a class="reference internal" href="generated/numpy.absolute.html#numpy.absolute" title="numpy.absolute"><code class="xref py py-obj docutils literal"><span class="pre">absolute</span></code></a>(x [,out])</span></td>
<td><span class="yiyi-st" id="yiyi-185">逐个计算绝对值。</span></td>
</tr>
<tr class="row-odd"><td><span class="yiyi-st" id="yiyi-186"><a class="reference internal" href="generated/numpy.fabs.html#numpy.fabs" title="numpy.fabs"><code class="xref py py-obj docutils literal"><span class="pre">fabs</span></code></a>(x [,out])</span></td>
<td><span class="yiyi-st" id="yiyi-187">按元素计算绝对值。</span></td>
</tr>
<tr class="row-even"><td><span class="yiyi-st" id="yiyi-188"><a class="reference internal" href="generated/numpy.sign.html#numpy.sign" title="numpy.sign"><code class="xref py py-obj docutils literal"><span class="pre">sign</span></code></a>(x [,out])</span></td>
<td><span class="yiyi-st" id="yiyi-189">返回数字符号的逐元素指示。</span></td>
</tr>
<tr class="row-odd"><td><span class="yiyi-st" id="yiyi-190"><a class="reference internal" href="generated/numpy.maximum.html#numpy.maximum" title="numpy.maximum"><code class="xref py py-obj docutils literal"><span class="pre">maximum</span></code></a>(x1,x2 [,out])</span></td>
<td><span class="yiyi-st" id="yiyi-191">数组元素的元素最大值。</span></td>
</tr>
<tr class="row-even"><td><span class="yiyi-st" id="yiyi-192"><a class="reference internal" href="generated/numpy.minimum.html#numpy.minimum" title="numpy.minimum"><code class="xref py py-obj docutils literal"><span class="pre">minimum</span></code></a>(x1,x2 [,out])</span></td>
<td><span class="yiyi-st" id="yiyi-193">元素最小的数组元素。</span></td>
</tr>
<tr class="row-odd"><td><span class="yiyi-st" id="yiyi-194"><a class="reference internal" href="generated/numpy.fmax.html#numpy.fmax" title="numpy.fmax"><code class="xref py py-obj docutils literal"><span class="pre">fmax</span></code></a>(x1,x2 [,out])</span></td>
<td><span class="yiyi-st" id="yiyi-195">数组元素的元素最大值。</span></td>
</tr>
<tr class="row-even"><td><span class="yiyi-st" id="yiyi-196"><a class="reference internal" href="generated/numpy.fmin.html#numpy.fmin" title="numpy.fmin"><code class="xref py py-obj docutils literal"><span class="pre">fmin</span></code></a>(x1,x2 [,out])</span></td>
<td><span class="yiyi-st" id="yiyi-197">元素最小的数组元素。</span></td>
</tr>
<tr class="row-odd"><td><span class="yiyi-st" id="yiyi-198"><a class="reference internal" href="generated/numpy.nan_to_num.html#numpy.nan_to_num" title="numpy.nan_to_num"><code class="xref py py-obj docutils literal"><span class="pre">nan_to_num</span></code></a>(x)</span></td>
<td><span class="yiyi-st" id="yiyi-199">用零和inf替换nan为有限数。</span></td>
</tr>
<tr class="row-even"><td><span class="yiyi-st" id="yiyi-200"><a class="reference internal" href="generated/numpy.real_if_close.html#numpy.real_if_close" title="numpy.real_if_close"><code class="xref py py-obj docutils literal"><span class="pre">real_if_close</span></code></a>(a [,tol])</span></td>
<td><span class="yiyi-st" id="yiyi-201">如果复杂的输入返回一个真实的数组,如果复杂的零件接近零。</span></td>
</tr>
<tr class="row-odd"><td><span class="yiyi-st" id="yiyi-202"><a class="reference internal" href="generated/numpy.interp.html#numpy.interp" title="numpy.interp"><code class="xref py py-obj docutils literal"><span class="pre">interp</span></code></a>(x,xp,fp [,left,right,period])</span></td>
<td><span class="yiyi-st" id="yiyi-203">一维线性插值。</span></td>
</tr>
</tbody>
</table>
</div>