Skip to content

Commit 2924812

Browse files
author
array-api-bot
committed
Deploy: 937d3b8
1 parent 43cf6ef commit 2924812

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

48 files changed

+294
-348
lines changed

2022.12/extensions/fourier_transform_functions.html

+3-3
Original file line numberDiff line numberDiff line change
@@ -378,13 +378,13 @@ <h2 id="objects-in-api">Objects in API<a class="headerlink" href="#objects-in-ap
378378
<td><p>Computes the one-dimensional inverse discrete Fourier transform of a signal with Hermitian symmetry.</p></td>
379379
</tr>
380380
<tr class="row-odd"><td><p><a class="reference internal" href="generated/array_api.fft.fftfreq.html#array_api.fft.fftfreq" title="array_api.fft.fftfreq"><code class="xref py py-obj docutils literal notranslate"><span class="pre">fftfreq</span></code></a>(n, /, *, d=1.0, device=None)</p></td>
381-
<td><p>Returns the discrete Fourier transform sample frequencies.</p></td>
381+
<td><p>Computes the discrete Fourier transform sample frequencies.</p></td>
382382
</tr>
383383
<tr class="row-even"><td><p><a class="reference internal" href="generated/array_api.fft.rfftfreq.html#array_api.fft.rfftfreq" title="array_api.fft.rfftfreq"><code class="xref py py-obj docutils literal notranslate"><span class="pre">rfftfreq</span></code></a>(n, /, *, d=1.0, device=None)</p></td>
384-
<td><p>Returns the discrete Fourier transform sample frequencies (for <code class="docutils literal notranslate"><span class="pre">rfft</span></code> and <code class="docutils literal notranslate"><span class="pre">irfft</span></code>).</p></td>
384+
<td><p>Computes the discrete Fourier transform sample frequencies (for <code class="docutils literal notranslate"><span class="pre">rfft</span></code> and <code class="docutils literal notranslate"><span class="pre">irfft</span></code>).</p></td>
385385
</tr>
386386
<tr class="row-odd"><td><p><a class="reference internal" href="generated/array_api.fft.fftshift.html#array_api.fft.fftshift" title="array_api.fft.fftshift"><code class="xref py py-obj docutils literal notranslate"><span class="pre">fftshift</span></code></a>(x, /, *, axes=None)</p></td>
387-
<td><p>Shift the zero-frequency component to the center of the spectrum.</p></td>
387+
<td><p>Shifts the zero-frequency component to the center of the spectrum.</p></td>
388388
</tr>
389389
<tr class="row-even"><td><p><a class="reference internal" href="generated/array_api.fft.ifftshift.html#array_api.fft.ifftshift" title="array_api.fft.ifftshift"><code class="xref py py-obj docutils literal notranslate"><span class="pre">ifftshift</span></code></a>(x, /, *, axes=None)</p></td>
390390
<td><p>Inverse of <code class="docutils literal notranslate"><span class="pre">fftshift</span></code>.</p></td>

2022.12/extensions/generated/array_api.fft.fft.html

+8-10
Original file line numberDiff line numberDiff line change
@@ -334,23 +334,21 @@ <h1 id="extensions-generated-array-api-fft-fft--page-root">fft<a class="headerli
334334
<dd><p>Computes the one-dimensional discrete Fourier transform.</p>
335335
<div class="admonition note">
336336
<p class="admonition-title">Note</p>
337-
<p>Applying the one-dimensional inverse discrete Fourier transform to the output of this function must return the original (i.e., non-transformed) input array within numerical accuracy (i.e., <code class="docutils literal notranslate"><span class="pre">ifft(fft(x))</span> <span class="pre">==</span> <span class="pre">x</span></code>), provided that the transform and inverse transform are performed with the same arguments (length, axis, and normalization mode).</p>
337+
<p>Applying the one-dimensional inverse discrete Fourier transform to the output of this function must return the original (i.e., non-transformed) input array within numerical accuracy (i.e., <code class="docutils literal notranslate"><span class="pre">ifft(fft(x))</span> <span class="pre">==</span> <span class="pre">x</span></code>), provided that the transform and inverse transform are performed with the same arguments (number of elements, axis, and normalization mode).</p>
338338
</div>
339339
<dl class="field-list simple">
340340
<dt class="field-odd">Parameters<span class="colon">:</span></dt>
341341
<dd class="field-odd"><ul class="simple">
342-
<li><p><strong>x</strong> (<em>array</em>) – input array. Should have a floating-point data type.</p></li>
343-
<li><p><strong>n</strong> (<em>int</em>) – <p>length of the transformed axis of the output. If</p>
342+
<li><p><strong>x</strong> (<em>array</em>) – input array. Should have a complex-valued floating-point data type.</p></li>
343+
<li><p><strong>n</strong> (<em>Optional</em><em>[</em><em>int</em><em>]</em>) – <p>number of elements over which to compute the transform along the axis (dimension) specified by <code class="docutils literal notranslate"><span class="pre">axis</span></code>. Let <code class="docutils literal notranslate"><span class="pre">M</span></code> be the size of the input array along the axis specified by <code class="docutils literal notranslate"><span class="pre">axis</span></code>. When <code class="docutils literal notranslate"><span class="pre">n</span></code> is <code class="docutils literal notranslate"><span class="pre">None</span></code>, the function must set <code class="docutils literal notranslate"><span class="pre">n</span></code> equal to <code class="docutils literal notranslate"><span class="pre">M</span></code>.</p>
344344
<ul>
345-
<li><p><code class="docutils literal notranslate"><span class="pre">n</span></code> is greater than the length of the input array, the input array is zero-padded to length <code class="docutils literal notranslate"><span class="pre">n</span></code>.</p></li>
346-
<li><p><code class="docutils literal notranslate"><span class="pre">n</span></code> is less than the length of the input array, the input array is trimmed to length <code class="docutils literal notranslate"><span class="pre">n</span></code>.</p></li>
347-
<li><p><code class="docutils literal notranslate"><span class="pre">n</span></code> is not provided, the length of the transformed axis of the output must equal the length of the input along the axis specified by <code class="docutils literal notranslate"><span class="pre">axis</span></code>.</p></li>
345+
<li><p>If <code class="docutils literal notranslate"><span class="pre">n</span></code> is greater than <code class="docutils literal notranslate"><span class="pre">M</span></code>, the axis specified by <code class="docutils literal notranslate"><span class="pre">axis</span></code> must be zero-padded to size <code class="docutils literal notranslate"><span class="pre">n</span></code>.</p></li>
346+
<li><p>If <code class="docutils literal notranslate"><span class="pre">n</span></code> is less than <code class="docutils literal notranslate"><span class="pre">M</span></code>, the axis specified by <code class="docutils literal notranslate"><span class="pre">axis</span></code> must be trimmed to size <code class="docutils literal notranslate"><span class="pre">n</span></code>.</p></li>
347+
<li><p>If <code class="docutils literal notranslate"><span class="pre">n</span></code> equals <code class="docutils literal notranslate"><span class="pre">M</span></code>, all elements along the axis specified by <code class="docutils literal notranslate"><span class="pre">axis</span></code> must be used when computing the transform.</p></li>
348348
</ul>
349349
<p>Default: <code class="docutils literal notranslate"><span class="pre">None</span></code>.</p>
350350
</p></li>
351-
<li><p><strong>axis</strong> (<em>int</em>) – <p>axis (dimension) over which to compute the Fourier transform. If not set, the last axis (dimension) is used.</p>
352-
<p>Default: <code class="docutils literal notranslate"><span class="pre">-1</span></code>.</p>
353-
</p></li>
351+
<li><p><strong>axis</strong> (<em>int</em>) – axis (dimension) of the input array over which to compute the transform. A valid <code class="docutils literal notranslate"><span class="pre">axis</span></code> must be an integer on the interval <code class="docutils literal notranslate"><span class="pre">[-N,</span> <span class="pre">N)</span></code>, where <code class="docutils literal notranslate"><span class="pre">N</span></code> is the rank (number of dimensions) of <code class="docutils literal notranslate"><span class="pre">x</span></code>. If an <code class="docutils literal notranslate"><span class="pre">axis</span></code> is specified as a negative integer, the function must determine the axis along which to compute the transform by counting backward from the last dimension (where <code class="docutils literal notranslate"><span class="pre">-1</span></code> refers to the last dimension). Default: <code class="docutils literal notranslate"><span class="pre">-1</span></code>.</p></li>
354352
<li><p><strong>norm</strong> (<em>Literal</em><em>[</em><em>'backward'</em><em>, </em><em>'ortho'</em><em>, </em><em>'forward'</em><em>]</em>) – <p>normalization mode. Should be one of the following modes:</p>
355353
<ul>
356354
<li><p><code class="docutils literal notranslate"><span class="pre">'backward'</span></code>: no normalization.</p></li>
@@ -362,7 +360,7 @@ <h1 id="extensions-generated-array-api-fft-fft--page-root">fft<a class="headerli
362360
</ul>
363361
</dd>
364362
<dt class="field-even">Returns<span class="colon">:</span></dt>
365-
<dd class="field-even"><p><strong>out</strong> (<em>array</em>) – an array transformed along the axis (dimension) indicated by <code class="docutils literal notranslate"><span class="pre">axis</span></code>. The returned array must have a complex floating-point data type determined by <a class="reference internal" href="../../API_specification/type_promotion.html#type-promotion"><span class="std std-ref">Type Promotion Rules</span></a>.</p>
363+
<dd class="field-even"><p><strong>out</strong> (<em>array</em>) – an array transformed along the axis (dimension) specified by <code class="docutils literal notranslate"><span class="pre">axis</span></code>. The returned array must have the same data type as <code class="docutils literal notranslate"><span class="pre">x</span></code> and must have the same shape as <code class="docutils literal notranslate"><span class="pre">x</span></code>, except for the axis specified by <code class="docutils literal notranslate"><span class="pre">axis</span></code> which must have size <code class="docutils literal notranslate"><span class="pre">n</span></code>.</p>
366364
</dd>
367365
</dl>
368366
<p class="rubric">Notes</p>

2022.12/extensions/generated/array_api.fft.fftfreq.html

+3-3
Original file line numberDiff line numberDiff line change
@@ -331,8 +331,8 @@ <h1 id="extensions-generated-array-api-fft-fftfreq--page-root">fftfreq<a class="
331331
<dl class="py function">
332332
<dt class="sig sig-object py" id="array_api.fft.fftfreq">
333333
<span class="sig-name descname"><span class="pre">fftfreq</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">n</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">int</span></span></em>, <em class="sig-param"><span class="o"><span class="pre">/</span></span></em>, <em class="sig-param"><span class="o"><span class="pre">*</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">d</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">float</span></span><span class="w"> </span><span class="o"><span class="pre">=</span></span><span class="w"> </span><span class="default_value"><span class="pre">1.0</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">device</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">device</span><span class="w"> </span><span class="p"><span class="pre">|</span></span><span class="w"> </span><span class="pre">None</span></span><span class="w"> </span><span class="o"><span class="pre">=</span></span><span class="w"> </span><span class="default_value"><span class="pre">None</span></span></em><span class="sig-paren">)</span> <span class="sig-return"><span class="sig-return-icon"></span> <span class="sig-return-typehint"><span class="pre">array</span></span></span><a class="headerlink" href="#array_api.fft.fftfreq" title="Permalink to this definition"></a></dt>
334-
<dd><p>Returns the discrete Fourier transform sample frequencies.</p>
335-
<p>For a Fourier transform of length <code class="docutils literal notranslate"><span class="pre">n</span></code> and length unit of <code class="docutils literal notranslate"><span class="pre">d</span></code> the frequencies are described as:</p>
334+
<dd><p>Computes the discrete Fourier transform sample frequencies.</p>
335+
<p>For a Fourier transform of length <code class="docutils literal notranslate"><span class="pre">n</span></code> and length unit of <code class="docutils literal notranslate"><span class="pre">d</span></code>, the frequencies are described as:</p>
336336
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">f</span> <span class="o">=</span> <span class="p">[</span><span class="mi">0</span><span class="p">,</span> <span class="mi">1</span><span class="p">,</span> <span class="o">...</span><span class="p">,</span> <span class="n">n</span><span class="o">/</span><span class="mi">2</span><span class="o">-</span><span class="mi">1</span><span class="p">,</span> <span class="o">-</span><span class="n">n</span><span class="o">/</span><span class="mi">2</span><span class="p">,</span> <span class="o">...</span><span class="p">,</span> <span class="o">-</span><span class="mi">1</span><span class="p">]</span> <span class="o">/</span> <span class="p">(</span><span class="n">d</span><span class="o">*</span><span class="n">n</span><span class="p">)</span> <span class="c1"># if n is even</span>
337337
<span class="n">f</span> <span class="o">=</span> <span class="p">[</span><span class="mi">0</span><span class="p">,</span> <span class="mi">1</span><span class="p">,</span> <span class="o">...</span><span class="p">,</span> <span class="p">(</span><span class="n">n</span><span class="o">-</span><span class="mi">1</span><span class="p">)</span><span class="o">/</span><span class="mi">2</span><span class="p">,</span> <span class="o">-</span><span class="p">(</span><span class="n">n</span><span class="o">-</span><span class="mi">1</span><span class="p">)</span><span class="o">/</span><span class="mi">2</span><span class="p">,</span> <span class="o">...</span><span class="p">,</span> <span class="o">-</span><span class="mi">1</span><span class="p">]</span> <span class="o">/</span> <span class="p">(</span><span class="n">d</span><span class="o">*</span><span class="n">n</span><span class="p">)</span> <span class="c1"># if n is odd</span>
338338
</pre></div>
@@ -346,7 +346,7 @@ <h1 id="extensions-generated-array-api-fft-fftfreq--page-root">fftfreq<a class="
346346
</ul>
347347
</dd>
348348
<dt class="field-even">Returns<span class="colon">:</span></dt>
349-
<dd class="field-even"><p><strong>out</strong> (<em>array</em>) – an array of length <code class="docutils literal notranslate"><span class="pre">n</span></code> containing the sample frequencies. The returned array must have a real-valued floating-point data type determined by <a class="reference internal" href="../../API_specification/type_promotion.html#type-promotion"><span class="std std-ref">Type Promotion Rules</span></a>.</p>
349+
<dd class="field-even"><p><strong>out</strong> (<em>array</em>) – an array of shape <code class="docutils literal notranslate"><span class="pre">(n,)</span></code> containing the sample frequencies. The returned array must have the default real-valued floating-point data type.</p>
350350
</dd>
351351
</dl>
352352
<p class="rubric">Notes</p>

0 commit comments

Comments
 (0)