Skip to content

Commit 08c34ed

Browse files
author
array-api-bot
committed
Deploy: 58d2d3c
1 parent 0816dfb commit 08c34ed

File tree

3 files changed

+12
-13
lines changed

3 files changed

+12
-13
lines changed

draft/API_specification/generated/array_api.take.html

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -476,21 +476,20 @@ <h1 id="api-specification-generated-array-api-take--page-root">take<a class="hea
476476
<dl class="field-list simple">
477477
<dt class="field-odd">Parameters<span class="colon">:</span></dt>
478478
<dd class="field-odd"><ul class="simple">
479-
<li><p><strong>x</strong> (<em>array</em>) – input array. Should have one or more dimensions (axes).</p></li>
480-
<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>
481-
<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>
482-
<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>
479+
<li><p><strong>x</strong> (<em>array</em>) – input array. <strong>Should</strong> have one or more axes.</p></li>
480+
<li><p><strong>indices</strong> (<em>array</em>) – array indices. The array <strong>must</strong> be one-dimensional and have an integer data type. If an index is negative, the function <strong>must</strong> determine the element to select along a specified axis 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>
481+
<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 <strong>must</strong> determine the axis along which to select values by counting from the last axis (where <code class="docutils literal notranslate"><span class="pre">-1</span></code> refers to the last axis).</p>
482+
<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> <strong>must</strong> be optional; however, if <code class="docutils literal notranslate"><span class="pre">x</span></code> has more than one axis, providing an <code class="docutils literal notranslate"><span class="pre">axis</span></code> <strong>must</strong> be required.</p>
483483
</p></li>
484484
</ul>
485485
</dd>
486486
<dt class="field-even">Returns<span class="colon">:</span></dt>
487-
<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>. The output array 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 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> whose size must equal the number of elements in <code class="docutils literal notranslate"><span class="pre">indices</span></code>.</p>
487+
<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>. The output array <strong>must</strong> have the same number of axes as <code class="docutils literal notranslate"><span class="pre">x</span></code> and <strong>must</strong> 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> whose size <strong>must</strong> equal the number of elements in <code class="docutils literal notranslate"><span class="pre">indices</span></code>.</p>
488488
</dd>
489489
</dl>
490490
<p class="rubric">Notes</p>
491491
<ul class="simple">
492-
<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>
493-
<li><p>This specification does not require bounds checking. The behavior for out-of-bounds indices is left unspecified.</p></li>
492+
<li><p>This specification does not require bounds checking. The behavior for out-of-bounds indices is unspecified and thus implementation-defined.</p></li>
494493
<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>
495494
</ul>
496495
<div class="versionadded">

draft/API_specification/generated/array_api.take_along_axis.html

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -476,18 +476,18 @@ <h1 id="api-specification-generated-array-api-take-along-axis--page-root">take_a
476476
<dl class="field-list simple">
477477
<dt class="field-odd">Parameters<span class="colon">:</span></dt>
478478
<dd class="field-odd"><ul class="simple">
479-
<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>
480-
<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>
481-
<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>
479+
<li><p><strong>x</strong> (<em>array</em>) – input array. <strong>Must</strong> be compatible with <code class="docutils literal notranslate"><span class="pre">indices</span></code>, except for the axis 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>
480+
<li><p><strong>indices</strong> (<em>array</em>) – array indices. <strong>Must</strong> have the same number of axes as <code class="docutils literal notranslate"><span class="pre">x</span></code> and <strong>must</strong> be compatible with <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> (see <a class="reference internal" href="../broadcasting.html#broadcasting"><span class="std std-ref">Broadcasting</span></a>). If an index is negative, the function <strong>must</strong> determine the element to select along a specified axis 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>
481+
<li><p><strong>axis</strong> (<em>int</em>) – axis along which to select values. A valid axis <strong>must</strong> 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 number of axes in <code class="docutils literal notranslate"><span class="pre">x</span></code>. If an axis is specified as a negative integer, the function <strong>must</strong> determine the axis along which to perform the operation by counting backward from the last axis (where <code class="docutils literal notranslate"><span class="pre">-1</span></code> refers to the last axis). If provided an invalid axis, the function <strong>must</strong> raise an exception. Default: <code class="docutils literal notranslate"><span class="pre">-1</span></code>.</p></li>
482482
</ul>
483483
</dd>
484484
<dt class="field-even">Returns<span class="colon">:</span></dt>
485-
<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>
485+
<dd class="field-even"><p><strong>out</strong> (<em>array</em>) – an array containing elements from <code class="docutils literal notranslate"><span class="pre">x</span></code>. The returned array <strong>must</strong> have the same data type as <code class="docutils literal notranslate"><span class="pre">x</span></code>. The returned array <strong>must</strong> have the same number of axes as <code class="docutils literal notranslate"><span class="pre">x</span></code> and <strong>must</strong> 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 specified by <code class="docutils literal notranslate"><span class="pre">axis</span></code> whose size <strong>must</strong> equal the size of the corresponding axis in <code class="docutils literal notranslate"><span class="pre">indices</span></code>.</p>
486486
</dd>
487487
</dl>
488488
<p class="rubric">Notes</p>
489489
<ul class="simple">
490-
<li><p>This specification does not require bounds checking. The behavior for out-of-bounds indices is left unspecified.</p></li>
490+
<li><p>This specification does not require bounds checking. The behavior for out-of-bounds indices is unspecified and thus implementation-defined.</p></li>
491491
</ul>
492492
<div class="versionadded">
493493
<p><span class="versionmodified added">New in version 2024.12.</span></p>

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)