Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit b529544

Browse files
author
array-api-bot
committed
Deploy: df8081c
1 parent edc9057 commit b529544

File tree

3 files changed

+11
-19
lines changed

3 files changed

+11
-19
lines changed

draft/API_specification/generated/array_api.take.html

Lines changed: 4 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -466,21 +466,12 @@ <h1 id="api-specification-generated-array-api-take--page-root">take<a class="hea
466466
<dt class="sig sig-object py" id="array_api.take">
467467
<span class="sig-name descname"><span class="pre">take</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">x</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">array</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">indices</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">array</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">axis</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">int</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.take" title="Link to this definition"></a></dt>
468468
<dd><p>Returns elements of an array along an axis.</p>
469-
<div class="admonition note">
470-
<p class="admonition-title">Note</p>
471-
<p>Conceptually, <code class="docutils literal notranslate"><span class="pre">take(x,</span> <span class="pre">indices,</span> <span class="pre">axis=3)</span></code> is equivalent to <code class="docutils literal notranslate"><span class="pre">x[:,:,:,indices,...]</span></code>; however, explicit indexing via arrays of indices is not currently supported in this specification due to concerns regarding <code class="docutils literal notranslate"><span class="pre">__setitem__</span></code> and array mutation semantics.</p>
472-
</div>
473469
<dl class="field-list simple">
474470
<dt class="field-odd">Parameters<span class="colon">:</span></dt>
475471
<dd class="field-odd"><ul class="simple">
476472
<li><p><strong>x</strong> (<em>array</em>) – input array. Should have one or more dimensions (axes).</p></li>
477-
<li><p><strong>indices</strong> (<em>array</em>) – <p>array indices. The array must be one-dimensional and have an integer data type.</p>
478-
<div class="admonition note">
479-
<p class="admonition-title">Note</p>
480-
<p>This specification does not require bounds checking. The behavior for out-of-bounds indices is left unspecified.</p>
481-
</div>
482-
</p></li>
483-
<li><p><strong>axis</strong> (<em>Optional</em><em>[</em><em>int</em><em>]</em>) – <p>axis over which to select values. If <code class="docutils literal notranslate"><span class="pre">axis</span></code> is negative, the function must determine the axis along which to select values by counting from the last dimension.</p>
473+
<li><p><strong>indices</strong> (<em>array</em>) – array indices. The array must be one-dimensional and have an integer data type. If an index is negative, the function must determine the element to select along a specified axis (dimension) by counting from the last element (where <code class="docutils literal notranslate"><span class="pre">-1</span></code> refers to the last element).</p></li>
474+
<li><p><strong>axis</strong> (<em>Optional</em><em>[</em><em>int</em><em>]</em>) – <p>axis over which to select values. If <code class="docutils literal notranslate"><span class="pre">axis</span></code> is negative, the function must determine the axis along which to select values by counting from the last dimension (where <code class="docutils literal notranslate"><span class="pre">-1</span></code> refers to the last dimension).</p>
484475
<p>If <code class="docutils literal notranslate"><span class="pre">x</span></code> is a one-dimensional array, providing an <code class="docutils literal notranslate"><span class="pre">axis</span></code> is optional; however, if <code class="docutils literal notranslate"><span class="pre">x</span></code> has more than one dimension, providing an <code class="docutils literal notranslate"><span class="pre">axis</span></code> is required.</p>
485476
</p></li>
486477
</ul>
@@ -491,6 +482,8 @@ <h1 id="api-specification-generated-array-api-take--page-root">take<a class="hea
491482
</dl>
492483
<p class="rubric">Notes</p>
493484
<ul class="simple">
485+
<li><p>Conceptually, <code class="docutils literal notranslate"><span class="pre">take(x,</span> <span class="pre">indices,</span> <span class="pre">axis=3)</span></code> is equivalent to <code class="docutils literal notranslate"><span class="pre">x[:,:,:,indices,...]</span></code>; however, explicit indexing via arrays of indices is not currently supported in this specification due to concerns regarding <code class="docutils literal notranslate"><span class="pre">__setitem__</span></code> and array mutation semantics.</p></li>
486+
<li><p>This specification does not require bounds checking. The behavior for out-of-bounds indices is left unspecified.</p></li>
494487
<li><p>When <code class="docutils literal notranslate"><span class="pre">x</span></code> is a zero-dimensional array, behavior is unspecified and thus implementation-defined.</p></li>
495488
</ul>
496489
<div class="versionadded">

draft/API_specification/generated/array_api.take_along_axis.html

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -470,19 +470,18 @@ <h1 id="api-specification-generated-array-api-take-along-axis--page-root">take_a
470470
<dt class="field-odd">Parameters<span class="colon">:</span></dt>
471471
<dd class="field-odd"><ul class="simple">
472472
<li><p><strong>x</strong> (<em>array</em>) – input array. Must be compatible with <code class="docutils literal notranslate"><span class="pre">indices</span></code>, except for the axis (dimension) specified by <code class="docutils literal notranslate"><span class="pre">axis</span></code> (see <a class="reference internal" href="../broadcasting.html#broadcasting"><span class="std std-ref">Broadcasting</span></a>).</p></li>
473-
<li><p><strong>indices</strong> (<em>array</em>) – <p>array indices. Must have the same rank (i.e., number of dimensions) as <code class="docutils literal notranslate"><span class="pre">x</span></code>.</p>
474-
<div class="admonition note">
475-
<p class="admonition-title">Note</p>
476-
<p>This specification does not require bounds checking. The behavior for out-of-bounds indices is left unspecified.</p>
477-
</div>
478-
</p></li>
479-
<li><p><strong>axis</strong> (<em>int</em>) – axis along which to select values. If <code class="docutils literal notranslate"><span class="pre">axis</span></code> is negative, the function must determine the axis along which to select values by counting from the last dimension. Default: <code class="docutils literal notranslate"><span class="pre">-1</span></code>.</p></li>
473+
<li><p><strong>indices</strong> (<em>array</em>) – array indices. Must have the same rank (i.e., number of dimensions) as <code class="docutils literal notranslate"><span class="pre">x</span></code>. If an index is negative, the function must determine the element to select along a specified axis (dimension) by counting from the last element (where <code class="docutils literal notranslate"><span class="pre">-1</span></code> refers to the last element).</p></li>
474+
<li><p><strong>axis</strong> (<em>int</em>) – axis along which to select values. If <code class="docutils literal notranslate"><span class="pre">axis</span></code> is negative, the function must determine the axis along which to select values by counting 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>
480475
</ul>
481476
</dd>
482477
<dt class="field-even">Returns<span class="colon">:</span></dt>
483478
<dd class="field-even"><p><strong>out</strong> (<em>array</em>) – an array having the same data type as <code class="docutils literal notranslate"><span class="pre">x</span></code>. Must have the same rank (i.e., number of dimensions) as <code class="docutils literal notranslate"><span class="pre">x</span></code> and must have a shape determined according to <a class="reference internal" href="../broadcasting.html#broadcasting"><span class="std std-ref">Broadcasting</span></a>, except for the axis (dimension) specified by <code class="docutils literal notranslate"><span class="pre">axis</span></code> whose size must equal the size of the corresponding axis (dimension) in <code class="docutils literal notranslate"><span class="pre">indices</span></code>.</p>
484479
</dd>
485480
</dl>
481+
<p class="rubric">Notes</p>
482+
<ul class="simple">
483+
<li><p>This specification does not require bounds checking. The behavior for out-of-bounds indices is left unspecified.</p></li>
484+
</ul>
486485
</dd></dl>
487486
</section>
488487

draft/searchindex.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)