Skip to content

Commit e860c0e

Browse files
author
array-api-bot
committed
Deploy: b4d28f0
1 parent 801ae02 commit e860c0e

16 files changed

+67
-68
lines changed

draft/API_specification/generated/array_api.broadcast_arrays.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -478,7 +478,7 @@ <h1 id="api-specification-generated-array-api-broadcast-arrays--page-root">broad
478478
<dd class="field-odd"><p><strong>arrays</strong> (<em>array</em>) – an arbitrary number of to-be broadcasted arrays.</p>
479479
</dd>
480480
<dt class="field-even">Returns<span class="colon">:</span></dt>
481-
<dd class="field-even"><p><strong>out</strong> (<em>List[array]</em>) – a list of broadcasted arrays. Each array must have the same shape. Each array must have the same dtype as its corresponding input array.</p>
481+
<dd class="field-even"><p><strong>out</strong> (<em>List[array]</em>) – a list of broadcasted arrays. Each array <strong>must</strong> have the same shape. Each array <strong>must</strong> have the same dtype as its corresponding input array.</p>
482482
</dd>
483483
</dl>
484484
</dd></dl>

draft/API_specification/generated/array_api.broadcast_to.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -476,13 +476,13 @@ <h1 id="api-specification-generated-array-api-broadcast-to--page-root">broadcast
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>) – array to broadcast. Must be capable of being broadcast to the specified <code class="docutils literal notranslate"><span class="pre">shape</span></code> (see <a class="reference internal" href="../broadcasting.html#broadcasting"><span class="std std-ref">Broadcasting</span></a>). If the array is incompatible with the specified shape, the function must raise an exception.</p></li>
479+
<li><p><strong>x</strong> (<em>array</em>) – array to broadcast. <strong>Must</strong> be capable of being broadcast to the specified <code class="docutils literal notranslate"><span class="pre">shape</span></code> (see <a class="reference internal" href="../broadcasting.html#broadcasting"><span class="std std-ref">Broadcasting</span></a>). If the array is incompatible with the specified shape, the function <strong>must</strong> raise an exception.</p></li>
480480
<li><p><strong>shape</strong> (<em>Tuple</em><em>[</em><em>int</em><em>, </em><em>...</em><em>]</em>) – array shape.</p></li>
481481
</ul>
482482
</dd>
483483
<dt class="field-even">Returns<span class="colon">:</span></dt>
484484
<dd class="field-even"><ul class="simple">
485-
<li><p><strong>out</strong> (<em>array</em>) – an array having the specified shape. Must have the same data type as <code class="docutils literal notranslate"><span class="pre">x</span></code>.</p></li>
485+
<li><p><strong>out</strong> (<em>array</em>) – an array having the specified shape. <strong>Must</strong> have the same data type as <code class="docutils literal notranslate"><span class="pre">x</span></code>.</p></li>
486486
<li><p><strong>.. versionchanged:: 2024.12</strong> – Clarified broadcast behavior.</p></li>
487487
</ul>
488488
</dd>

draft/API_specification/generated/array_api.concat.html

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -476,15 +476,15 @@ <h1 id="api-specification-generated-array-api-concat--page-root">concat<a class=
476476
<dl class="field-list">
477477
<dt class="field-odd">Parameters<span class="colon">:</span></dt>
478478
<dd class="field-odd"><ul class="simple">
479-
<li><p><strong>arrays</strong> (<em>Union</em><em>[</em><em>Tuple</em><em>[</em><em>array</em><em>, </em><em>...</em><em>]</em><em>, </em><em>List</em><em>[</em><em>array</em><em>]</em><em>]</em>) – input arrays to join. The arrays must have the same shape, except in the dimension specified by <code class="docutils literal notranslate"><span class="pre">axis</span></code>.</p></li>
480-
<li><p><strong>axis</strong> (<em>Optional</em><em>[</em><em>int</em><em>]</em>) – axis along which the arrays will be joined. If <code class="docutils literal notranslate"><span class="pre">axis</span></code> is <code class="docutils literal notranslate"><span class="pre">None</span></code>, arrays must be flattened before concatenation. If <code class="docutils literal notranslate"><span class="pre">axis</span></code> is negative, the function must determine the axis along which to join by counting from the last dimension. Default: <code class="docutils literal notranslate"><span class="pre">0</span></code>.</p></li>
479+
<li><p><strong>arrays</strong> (<em>Union</em><em>[</em><em>Tuple</em><em>[</em><em>array</em><em>, </em><em>...</em><em>]</em><em>, </em><em>List</em><em>[</em><em>array</em><em>]</em><em>]</em>) – input arrays to join. The arrays <strong>must</strong> have the same shape, except in the dimension specified by <code class="docutils literal notranslate"><span class="pre">axis</span></code>.</p></li>
480+
<li><p><strong>axis</strong> (<em>Optional</em><em>[</em><em>int</em><em>]</em>) – axis along which to join the arrays. 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 each array. 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. If <code class="docutils literal notranslate"><span class="pre">axis</span></code> is <code class="docutils literal notranslate"><span class="pre">None</span></code>, arrays <strong>must</strong> be flattened before concatenation. Default: <code class="docutils literal notranslate"><span class="pre">0</span></code>.</p></li>
481481
</ul>
482482
</dd>
483483
<dt class="field-even">Returns<span class="colon">:</span></dt>
484-
<dd class="field-even"><p><strong>out</strong> (<em>array</em>) – an output array containing the concatenated values. If the input arrays have different data types, normal <a class="reference internal" href="../type_promotion.html#type-promotion"><span class="std std-ref">Type Promotion Rules</span></a> must apply. If the input arrays have the same data type, the output array must have the same data type as the input arrays.</p>
484+
<dd class="field-even"><p><strong>out</strong> (<em>array</em>) – an output array containing the concatenated values. If the input arrays have different data types, normal <a class="reference internal" href="../type_promotion.html#type-promotion"><span class="std std-ref">Type Promotion Rules</span></a> <strong>must</strong> apply. If the input arrays have the same data type, the output array <strong>must</strong> have the same data type as the input arrays.</p>
485485
<div class="admonition note">
486486
<p class="admonition-title">Note</p>
487-
<p>This specification leaves type promotion between data type families (i.e., <code class="docutils literal notranslate"><span class="pre">intxx</span></code> and <code class="docutils literal notranslate"><span class="pre">floatxx</span></code>) unspecified.</p>
487+
<p>This specification leaves type promotion between data type families (i.e., <code class="docutils literal notranslate"><span class="pre">intxx</span></code> and <code class="docutils literal notranslate"><span class="pre">floatxx</span></code>) unspecified and thus implementation-defined.</p>
488488
</div>
489489
</dd>
490490
</dl>

draft/API_specification/generated/array_api.expand_dims.html

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -472,19 +472,19 @@ <h1 id="api-specification-generated-array-api-expand-dims--page-root">expand_dim
472472
<dl class="py function">
473473
<dt class="sig sig-object py" id="array_api.expand_dims">
474474
<span class="sig-name descname"><span class="pre">expand_dims</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="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><span class="w"> </span><span class="o"><span class="pre">=</span></span><span class="w"> </span><span class="default_value"><span class="pre">0</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.expand_dims" title="Link to this definition"></a></dt>
475-
<dd><p>Expands the shape of an array by inserting a new axis (dimension) of size one at the position specified by <code class="docutils literal notranslate"><span class="pre">axis</span></code>.</p>
475+
<dd><p>Expands the shape of an array by inserting a new axis of size one at the position specified by <code class="docutils literal notranslate"><span class="pre">axis</span></code>.</p>
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">
479479
<li><p><strong>x</strong> (<em>array</em>) – input array.</p></li>
480-
<li><p><strong>axis</strong> (<em>int</em>) – axis position (zero-based). If <code class="docutils literal notranslate"><span class="pre">x</span></code> has rank (i.e, number of dimensions) <code class="docutils literal notranslate"><span class="pre">N</span></code>, a valid <code class="docutils literal notranslate"><span class="pre">axis</span></code> must reside on the closed-interval <code class="docutils literal notranslate"><span class="pre">[-N-1,</span> <span class="pre">N]</span></code>. If provided a negative <code class="docutils literal notranslate"><span class="pre">axis</span></code>, the axis position at which to insert a singleton dimension must be computed as <code class="docutils literal notranslate"><span class="pre">N</span> <span class="pre">+</span> <span class="pre">axis</span> <span class="pre">+</span> <span class="pre">1</span></code>. Hence, if provided <code class="docutils literal notranslate"><span class="pre">-1</span></code>, the resolved axis position must be <code class="docutils literal notranslate"><span class="pre">N</span></code> (i.e., a singleton dimension must be appended to the input array <code class="docutils literal notranslate"><span class="pre">x</span></code>). If provided <code class="docutils literal notranslate"><span class="pre">-N-1</span></code>, the resolved axis position must be <code class="docutils literal notranslate"><span class="pre">0</span></code> (i.e., a singleton dimension must be prepended to the input array <code class="docutils literal notranslate"><span class="pre">x</span></code>).</p></li>
480+
<li><p><strong>axis</strong> (<em>int</em>) – axis position (zero-based). A valid <code class="docutils literal notranslate"><span class="pre">axis</span></code> <strong>must</strong> reside on the closed-interval <code class="docutils literal notranslate"><span class="pre">[-N-1,</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 axis position at which to insert a singleton dimension <strong>must</strong> be computed as <code class="docutils literal notranslate"><span class="pre">N</span> <span class="pre">+</span> <span class="pre">axis</span> <span class="pre">+</span> <span class="pre">1</span></code>. Hence, if provided <code class="docutils literal notranslate"><span class="pre">-1</span></code>, the resolved axis position <strong>must</strong> be <code class="docutils literal notranslate"><span class="pre">N</span></code> (i.e., a singleton dimension <strong>must</strong> be appended to the input array <code class="docutils literal notranslate"><span class="pre">x</span></code>). If provided <code class="docutils literal notranslate"><span class="pre">-N-1</span></code>, the resolved axis position <strong>must</strong> be <code class="docutils literal notranslate"><span class="pre">0</span></code> (i.e., a singleton dimension <strong>must</strong> be prepended to the input array <code class="docutils literal notranslate"><span class="pre">x</span></code>). If provided an invalid axis, the function <strong>must</strong> raise an exception. Default: <code class="docutils literal notranslate"><span class="pre">0</span></code>.</p></li>
481481
</ul>
482482
</dd>
483483
<dt class="field-even">Returns<span class="colon">:</span></dt>
484-
<dd class="field-even"><p><strong>out</strong> (<em>array</em>) – an expanded output array having the same data type as <code class="docutils literal notranslate"><span class="pre">x</span></code>.</p>
484+
<dd class="field-even"><p><strong>out</strong> (<em>array</em>) – an expanded output array. <strong>Must</strong> have the same data type as <code class="docutils literal notranslate"><span class="pre">x</span></code>.</p>
485485
</dd>
486486
<dt class="field-odd">Raises<span class="colon">:</span></dt>
487-
<dd class="field-odd"><p><strong>IndexError</strong> – If provided an invalid <code class="docutils literal notranslate"><span class="pre">axis</span></code> position, an <code class="docutils literal notranslate"><span class="pre">IndexError</span></code> should be raised.</p>
487+
<dd class="field-odd"><p><strong>IndexError</strong> – If provided an invalid <code class="docutils literal notranslate"><span class="pre">axis</span></code>, an <code class="docutils literal notranslate"><span class="pre">IndexError</span></code> <strong>should</strong> be raised.</p>
488488
</dd>
489489
</dl>
490490
</dd></dl>

draft/API_specification/generated/array_api.flip.html

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -472,16 +472,16 @@ <h1 id="api-specification-generated-array-api-flip--page-root">flip<a class="hea
472472
<dl class="py function">
473473
<dt class="sig sig-object py" id="array_api.flip">
474474
<span class="sig-name descname"><span class="pre">flip</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="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">Tuple</span><span class="p"><span class="pre">[</span></span><span class="pre">int</span><span class="p"><span class="pre">,</span></span><span class="w"> </span><span class="p"><span class="pre">...</span></span><span class="p"><span class="pre">]</span></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.flip" title="Link to this definition"></a></dt>
475-
<dd><p>Reverses the order of elements in an array along the given axis. The shape of the array must be preserved.</p>
475+
<dd><p>Reverses the order of elements in an array along the given axis.</p>
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">
479479
<li><p><strong>x</strong> (<em>array</em>) – input array.</p></li>
480-
<li><p><strong>axis</strong> (<em>Optional</em><em>[</em><em>Union</em><em>[</em><em>int</em><em>, </em><em>Tuple</em><em>[</em><em>int</em><em>, </em><em>...</em><em>]</em><em>]</em><em>]</em>) – axis (or axes) along which to flip. If <code class="docutils literal notranslate"><span class="pre">axis</span></code> is <code class="docutils literal notranslate"><span class="pre">None</span></code>, the function must flip all input array axes. If <code class="docutils literal notranslate"><span class="pre">axis</span></code> is negative, the function must count from the last dimension. If provided more than one axis, the function must flip only the specified axes. Default: <code class="docutils literal notranslate"><span class="pre">None</span></code>.</p></li>
480+
<li><p><strong>axis</strong> (<em>Optional</em><em>[</em><em>Union</em><em>[</em><em>int</em><em>, </em><em>Tuple</em><em>[</em><em>int</em><em>, </em><em>...</em><em>]</em><em>]</em><em>]</em>) – axis (or axes) along which to reverse elements. 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. If <code class="docutils literal notranslate"><span class="pre">axis</span></code> is <code class="docutils literal notranslate"><span class="pre">None</span></code>, the function <strong>must</strong> flip all input array axes. If provided more than one axis, the function <strong>must</strong> flip only the specified axes. Default: <code class="docutils literal notranslate"><span class="pre">None</span></code>.</p></li>
481481
</ul>
482482
</dd>
483483
<dt class="field-even">Returns<span class="colon">:</span></dt>
484-
<dd class="field-even"><p><strong>out</strong> (<em>array</em>) – an output array having the same data type and shape as <code class="docutils literal notranslate"><span class="pre">x</span></code> and whose elements, relative to <code class="docutils literal notranslate"><span class="pre">x</span></code>, are reordered.</p>
484+
<dd class="field-even"><p><strong>out</strong> (<em>array</em>) – an output array. The returned array <strong>must</strong> have the same data type and shape as <code class="docutils literal notranslate"><span class="pre">x</span></code>. The returned array must have the same elements as <code class="docutils literal notranslate"><span class="pre">x</span></code>, but which are reordered relative to <code class="docutils literal notranslate"><span class="pre">x</span></code>.</p>
485485
</dd>
486486
</dl>
487487
</dd></dl>

0 commit comments

Comments
 (0)