Skip to content

Commit f580529

Browse files
author
github-actions[doc-deploy-bot]
committed
Docs for pull request 1921
1 parent 3fb4858 commit f580529

File tree

6 files changed

+489
-1060
lines changed

6 files changed

+489
-1060
lines changed

pulls/1921/_modules/dpctl/tensor/_sorting.html

Lines changed: 468 additions & 2 deletions
Large diffs are not rendered by default.

pulls/1921/_modules/dpctl/tensor/_topk.html

Lines changed: 0 additions & 1039 deletions
This file was deleted.

pulls/1921/_modules/index.html

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -840,7 +840,6 @@ <h1>All modules for which code is available</h1>
840840
<li><a href="dpctl/tensor/_sorting.html">dpctl.tensor._sorting</a></li>
841841
<li><a href="dpctl/tensor/_statistical_functions.html">dpctl.tensor._statistical_functions</a></li>
842842
<li><a href="dpctl/tensor/_testing.html">dpctl.tensor._testing</a></li>
843-
<li><a href="dpctl/tensor/_topk.html">dpctl.tensor._topk</a></li>
844843
<li><a href="dpctl/tensor/_type_utils.html">dpctl.tensor._type_utils</a></li>
845844
<li><a href="dpctl/tensor/_usmarray.html">dpctl.tensor._usmarray</a></li>
846845
<li><a href="dpctl/tensor/_utility_functions.html">dpctl.tensor._utility_functions</a></li>

pulls/1921/api_reference/dpctl/generated/dpctl.tensor.top_k.html

Lines changed: 20 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -821,7 +821,7 @@
821821
<h1>dpctl.tensor.top_k<a class="headerlink" href="#dpctl-tensor-top-k" title="Permalink to this heading"></a></h1>
822822
<dl class="py function">
823823
<dt class="sig sig-object py" id="dpctl.tensor.top_k">
824-
<span class="sig-prename descclassname"><span class="pre">dpctl.tensor.</span></span><span class="sig-name descname"><span class="pre">top_k</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">x</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">k</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">axis</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">mode</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">'largest'</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="../../../_modules/dpctl/tensor/_topk.html#top_k"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#dpctl.tensor.top_k" title="Permalink to this definition"></a></dt>
824+
<span class="sig-prename descclassname"><span class="pre">dpctl.tensor.</span></span><span class="sig-name descname"><span class="pre">top_k</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">x</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">k</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">axis</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">mode</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">'largest'</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="../../../_modules/dpctl/tensor/_sorting.html#top_k"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#dpctl.tensor.top_k" title="Permalink to this definition"></a></dt>
825825
<dd><p>Returns the <cite>k</cite> largest or smallest values and their indices in the input
826826
array <cite>x</cite> along the specified axis <cite>axis</cite>.</p>
827827
<dl class="field-list simple">
@@ -831,28 +831,31 @@ <h1>dpctl.tensor.top_k<a class="headerlink" href="#dpctl-tensor-top-k" title="Pe
831831
<li><p><strong>k</strong> (<a class="reference external" href="https://docs.python.org/3/library/functions.html#int" title="(in Python v3.13)"><em>int</em></a>) – number of elements to find. Must be a positive integer value.</p></li>
832832
<li><p><strong>axis</strong> (<em>Optional</em><em>[</em><a class="reference external" href="https://docs.python.org/3/library/functions.html#int" title="(in Python v3.13)"><em>int</em></a><em>]</em>) – axis along which to search. If <cite>None</cite>, the search will be performed
833833
over the flattened array. Default: <code class="docutils literal notranslate"><span class="pre">None</span></code>.</p></li>
834-
<li><p><strong>mode</strong> (<em>Literal</em><em>[</em><em>&quot;largest&quot;</em><em>, </em><em>&quot;smallest&quot;</em><em>]</em>) – search mode. Must be one of the following modes:
835-
- <cite>“largest”</cite>: return the <cite>k</cite> largest elements.
836-
- <cite>“smallest”</cite>: return the <cite>k</cite> smallest elements.
837-
Default: <cite>“largest”</cite>.</p></li>
834+
<li><p><strong>mode</strong> (<em>Literal</em><em>[</em><em>&quot;largest&quot;</em><em>, </em><em>&quot;smallest&quot;</em><em>]</em>) – <p>search mode. Must be one of the following modes:</p>
835+
<ul>
836+
<li><p><cite>”largest”</cite>: return the <cite>k</cite> largest elements.</p></li>
837+
<li><p><cite>”smallest”</cite>: return the <cite>k</cite> smallest elements.</p></li>
838+
</ul>
839+
<p>Default: <cite>“largest”</cite>.</p>
840+
</p></li>
838841
</ul>
839842
</dd>
840843
<dt class="field-even">Returns<span class="colon">:</span></dt>
841-
<dd class="field-even"><p><p>a namedtuple <cite>(values, indices)</cite> whose</p>
844+
<dd class="field-even"><p><dl class="simple">
845+
<dt>tuple[usm_ndarray, usm_ndarray]</dt><dd><p>a namedtuple <cite>(values, indices)</cite> whose</p>
842846
<ul class="simple">
843-
<li><p>first element <cite>values</cite> will be an array containing the <cite>k</cite> largest or
844-
smallest elements of <cite>x</cite>. The array has the same data type as <cite>x</cite>.
845-
If <cite>axis</cite> was <cite>None</cite>, <cite>values</cite> will be a one-dimensional array
846-
with shape <cite>(k,)</cite> and otherwise, <cite>values</cite> will have shape
847-
<cite>x.shape[:axis] + (k,) + x.shape[axis+1:]</cite></p></li>
848-
<li><p>second element <cite>indices</cite> will be an array containing indices of <cite>x</cite>
849-
that result in <cite>values</cite>. The array will have the same shape as
850-
<cite>values</cite> and will have the default array index data type.</p></li>
847+
<li><p>first element <cite>values</cite> will be an array containing the <cite>k</cite>
848+
largest or smallest elements of <cite>x</cite>. The array will have the same
849+
data type as <cite>x</cite>. If <cite>axis</cite> was <cite>None</cite>, <cite>values</cite> will be a
850+
one-dimensional array with shape <cite>(k,)</cite> and otherwise, <cite>values</cite>
851+
will have shape <cite>x.shape[:axis] + (k,) + x.shape[axis+1:]</cite></p></li>
852+
<li><p>second element <cite>indices</cite> will be an array containing indices of
853+
<cite>x</cite> that result in <cite>values</cite>. The array will have the same shape
854+
as <cite>values</cite> and will have the default array index data type.</p></li>
851855
</ul>
852-
</p>
853856
</dd>
854-
<dt class="field-odd">Return type<span class="colon">:</span></dt>
855-
<dd class="field-odd"><p><a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#tuple" title="(in Python v3.13)">tuple</a>[<a class="reference internal" href="dpctl.tensor.usm_ndarray.html#dpctl.tensor.usm_ndarray" title="dpctl.tensor.usm_ndarray">usm_ndarray</a>, <a class="reference internal" href="dpctl.tensor.usm_ndarray.html#dpctl.tensor.usm_ndarray" title="dpctl.tensor.usm_ndarray">usm_ndarray</a>]</p>
857+
</dl>
858+
</p>
856859
</dd>
857860
</dl>
858861
</dd></dl>

pulls/1921/objects.inv

0 Bytes
Binary file not shown.

pulls/1921/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)