Skip to content

Commit 91cc084

Browse files
author
array-api-bot
committed
Deploy: a52285e
1 parent e860c0e commit 91cc084

File tree

6 files changed

+36
-48
lines changed

6 files changed

+36
-48
lines changed

draft/API_specification/generated/array_api.info.__array_namespace_info__.html

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -473,14 +473,16 @@ <h1 id="api-specification-generated-array-api-info-array-namespace-info--page-ro
473473
<dt class="sig sig-object py" id="array_api.info.__array_namespace_info__">
474474
<span class="sig-name descname"><span class="pre">__array_namespace_info__</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span> <span class="sig-return"><span class="sig-return-icon"></span> <span class="sig-return-typehint"><span class="pre">Info</span></span></span><a class="headerlink" href="#array_api.info.__array_namespace_info__" title="Link to this definition"></a></dt>
475475
<dd><p>Returns a namespace with Array API namespace inspection utilities.</p>
476-
<p>See <a class="reference internal" href="../inspection.html#inspection"><span class="std std-ref">Inspection</span></a> for a list of inspection APIs.</p>
477476
<dl class="field-list simple">
478477
<dt class="field-odd">Returns<span class="colon">:</span></dt>
479-
<dd class="field-odd"><p><strong>out</strong> (<em>Info</em>) – An object containing Array API namespace inspection utilities.</p>
478+
<dd class="field-odd"><p><strong>out</strong> (<em>Info</em>) – an object containing Array API namespace inspection utilities.</p>
480479
</dd>
481480
</dl>
482481
<p class="rubric">Notes</p>
483-
<p>The returned object may be either a namespace or a class, so long as an Array API user can access inspection utilities as follows:</p>
482+
<ul class="simple">
483+
<li><p>See <a class="reference internal" href="../inspection.html#inspection"><span class="std std-ref">Inspection</span></a> for a list of inspection APIs.</p></li>
484+
<li><p>The returned object <strong>may</strong> be either a namespace or a class, as long as an Array API user can access inspection utilities as follows:</p></li>
485+
</ul>
484486
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">info</span> <span class="o">=</span> <span class="n">xp</span><span class="o">.</span><span class="n">__array_namespace_info__</span><span class="p">()</span>
485487
<span class="n">info</span><span class="o">.</span><span class="n">capabilities</span><span class="p">()</span>
486488
<span class="n">info</span><span class="o">.</span><span class="n">devices</span><span class="p">()</span>

draft/API_specification/generated/array_api.info.capabilities.html

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -473,15 +473,14 @@ <h1 id="api-specification-generated-array-api-info-capabilities--page-root">capa
473473
<dt class="sig sig-object py" id="array_api.info.capabilities">
474474
<span class="sig-name descname"><span class="pre">capabilities</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span> <span class="sig-return"><span class="sig-return-icon"></span> <span class="sig-return-typehint"><span class="pre">Capabilities</span></span></span><a class="headerlink" href="#array_api.info.capabilities" title="Link to this definition"></a></dt>
475475
<dd><p>Returns a dictionary of array library capabilities.</p>
476-
<p>The dictionary must contain the following keys:</p>
477-
<ul class="simple">
478-
<li><p><code class="code docutils literal notranslate"><span class="pre">"boolean</span> <span class="pre">indexing"</span></code>: boolean indicating whether an array library supports boolean indexing. If a conforming implementation fully supports boolean indexing in compliance with this specification (see <a class="reference internal" href="../indexing.html#indexing"><span class="std std-ref">Indexing</span></a>), the corresponding dictionary value must be <code class="docutils literal notranslate"><span class="pre">True</span></code>; otherwise, the value must be <code class="docutils literal notranslate"><span class="pre">False</span></code>.</p></li>
479-
<li><p><code class="code docutils literal notranslate"><span class="pre">"data-dependent</span> <span class="pre">shapes"</span></code>: boolean indicating whether an array library supports data-dependent output shapes. If a conforming implementation fully supports all APIs included in this specification (excluding boolean indexing) which have data-dependent output shapes, as explicitly demarcated throughout the specification, the corresponding dictionary value must be <code class="docutils literal notranslate"><span class="pre">True</span></code>; otherwise, the value must be <code class="docutils literal notranslate"><span class="pre">False</span></code>.</p></li>
480-
<li><p><code class="code docutils literal notranslate"><span class="pre">"max</span> <span class="pre">dimensions"</span></code>: maximum number of supported dimensions. If a conforming implementation supports arrays having an arbitrary number of dimensions (potentially infinite), the corresponding dictionary value must be <code class="docutils literal notranslate"><span class="pre">None</span></code>; otherwise, the value must be a finite integer.</p></li>
481-
</ul>
482476
<dl class="field-list simple">
483477
<dt class="field-odd">Returns<span class="colon">:</span></dt>
484-
<dd class="field-odd"><p><strong>out</strong> (<em>Capabilities</em>) – a dictionary of array library capabilities.</p>
478+
<dd class="field-odd"><p><strong>out</strong> (<em>Capabilities</em>) – a dictionary of array library capabilities. The returned dictionary <strong>must</strong> contain the following keys:</p>
479+
<ul class="simple">
480+
<li><p><code class="code docutils literal notranslate"><span class="pre">"boolean</span> <span class="pre">indexing"</span></code>: boolean indicating whether an array library supports boolean indexing. If a conforming implementation fully supports boolean indexing in compliance with this specification (see <a class="reference internal" href="../indexing.html#indexing"><span class="std std-ref">Indexing</span></a>), the corresponding dictionary value <strong>must</strong> be <code class="docutils literal notranslate"><span class="pre">True</span></code>; otherwise, the value <strong>must</strong> be <code class="docutils literal notranslate"><span class="pre">False</span></code>.</p></li>
481+
<li><p><code class="code docutils literal notranslate"><span class="pre">"data-dependent</span> <span class="pre">shapes"</span></code>: boolean indicating whether an array library supports data-dependent output shapes. If a conforming implementation fully supports all APIs included in this specification (excluding boolean indexing) which have data-dependent output shapes, as explicitly demarcated throughout the specification, the corresponding dictionary value <strong>must</strong> be <code class="docutils literal notranslate"><span class="pre">True</span></code>; otherwise, the value <strong>must</strong> be <code class="docutils literal notranslate"><span class="pre">False</span></code>.</p></li>
482+
<li><p><code class="code docutils literal notranslate"><span class="pre">"max</span> <span class="pre">dimensions"</span></code>: maximum number of supported dimensions. If a conforming implementation supports arrays having an arbitrary number of dimensions (potentially infinite), the corresponding dictionary value <strong>must</strong> be <code class="docutils literal notranslate"><span class="pre">None</span></code>; otherwise, the value <strong>must</strong> be a finite integer.</p></li>
483+
</ul>
485484
</dd>
486485
</dl>
487486
<p class="rubric">Notes</p>

draft/API_specification/generated/array_api.info.default_dtypes.html

Lines changed: 10 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -473,28 +473,25 @@ <h1 id="api-specification-generated-array-api-info-default-dtypes--page-root">de
473473
<dt class="sig sig-object py" id="array_api.info.default_dtypes">
474474
<span class="sig-name descname"><span class="pre">default_dtypes</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="o"><span class="pre">*</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">DefaultDataTypes</span></span></span><a class="headerlink" href="#array_api.info.default_dtypes" title="Link to this definition"></a></dt>
475475
<dd><p>Returns a dictionary containing default data types.</p>
476-
<p>The dictionary must have the following keys:</p>
476+
<dl class="field-list">
477+
<dt class="field-odd">Parameters<span class="colon">:</span></dt>
478+
<dd class="field-odd"><p><strong>device</strong> (<em>Optional</em><em>[</em><em>device</em><em>]</em>) – device for which to return default data types. If <code class="docutils literal notranslate"><span class="pre">device</span></code> is <code class="docutils literal notranslate"><span class="pre">None</span></code>, the returned data types <strong>must</strong> be the default data types for the current device; otherwise, the returned data types <strong>must</strong> be default data types specific to the specified device. Default: <code class="docutils literal notranslate"><span class="pre">None</span></code>.</p>
479+
</dd>
480+
<dt class="field-even">Returns<span class="colon">:</span></dt>
481+
<dd class="field-even"><p><strong>out</strong> (<em>DefaultDataTypes</em>) – a dictionary containing the default data type for respective data type kinds. The returned dictionary <strong>must</strong> have the following keys:</p>
477482
<ul class="simple">
478483
<li><p><code class="code docutils literal notranslate"><span class="pre">"real</span> <span class="pre">floating"</span></code>: default real floating-point data type.</p></li>
479484
<li><p><code class="code docutils literal notranslate"><span class="pre">"complex</span> <span class="pre">floating"</span></code>: default complex floating-point data type.</p></li>
480485
<li><p><code class="code docutils literal notranslate"><span class="pre">"integral"</span></code>: default integral data type.</p></li>
481486
<li><p><code class="code docutils literal notranslate"><span class="pre">"indexing"</span></code>: default array index data type.</p></li>
482487
</ul>
483-
<p>Dictionary values must be the corresponding data type object.</p>
484-
<dl class="field-list simple">
485-
<dt class="field-odd">Parameters<span class="colon">:</span></dt>
486-
<dd class="field-odd"><p><strong>device</strong> (<em>Optional</em><em>[</em><em>device</em><em>]</em>) – <p>device for which to return default data types. If <code class="docutils literal notranslate"><span class="pre">device</span></code> is <code class="docutils literal notranslate"><span class="pre">None</span></code>, the returned data types must be the default data types for the current device; otherwise, the returned data types must be default data types specific to the specified device. Default: <code class="docutils literal notranslate"><span class="pre">None</span></code>.</p>
487-
<div class="admonition note">
488-
<p class="admonition-title">Note</p>
489-
<p>Some array libraries have the concept of a device context manager, allowing library consumers to manage the current device context. When <code class="docutils literal notranslate"><span class="pre">device</span></code> is <code class="docutils literal notranslate"><span class="pre">None</span></code>, libraries supporting a device context should return the default data types for the current device. For libraries without a context manager or supporting only a single device, those libraries should return the default data types for the default device.</p>
490-
</div>
491-
</p>
492-
</dd>
493-
<dt class="field-even">Returns<span class="colon">:</span></dt>
494-
<dd class="field-even"><p><strong>out</strong> (<em>DefaultDataTypes</em>) – a dictionary containing the default data type for respective data type kinds.</p>
488+
<p>Dictionary values <strong>must</strong> be the corresponding data type object.</p>
495489
</dd>
496490
</dl>
497491
<p class="rubric">Notes</p>
492+
<ul class="simple">
493+
<li><p>Some array libraries have the concept of a device context manager, allowing library consumers to manage the current device context. When <code class="docutils literal notranslate"><span class="pre">device</span></code> is <code class="docutils literal notranslate"><span class="pre">None</span></code>, libraries supporting a device context <strong>must</strong> return the default data types for the current device. For libraries without a context manager or supporting only a single device, those libraries <strong>must</strong> return the default data types for the default device.</p></li>
494+
</ul>
498495
</dd></dl>
499496
</section>
500497

draft/API_specification/generated/array_api.info.devices.html

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -479,7 +479,9 @@ <h1 id="api-specification-generated-array-api-info-devices--page-root">devices<a
479479
</dd>
480480
</dl>
481481
<p class="rubric">Notes</p>
482-
<p>Each device object (see <a class="reference internal" href="../../design_topics/device_support.html#device-support"><span class="std std-ref">Device support</span></a>) in the list of returned devices must be an object which can be provided as a valid keyword-argument to array creation functions.</p>
482+
<ul class="simple">
483+
<li><p>Each device object (see <a class="reference internal" href="../../design_topics/device_support.html#device-support"><span class="std std-ref">Device support</span></a>) in the list of returned devices <strong>must</strong> be an object which can be provided as a valid keyword-argument to array creation functions.</p></li>
484+
</ul>
483485
<p class="rubric">Notes</p>
484486
</dd></dl>
485487
</section>

0 commit comments

Comments
 (0)