Skip to content

Commit 7df781f

Browse files
committed
Deploying to gh-pages from @ cdd1c8d 🚀
1 parent 3e05bd9 commit 7df781f

File tree

5 files changed

+16
-1
lines changed

5 files changed

+16
-1
lines changed

_sources/helper-functions.rst.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@ yet.
5151
.. autofunction:: is_jax_array
5252
.. autofunction:: is_pydata_sparse_array
5353
.. autofunction:: is_ndonnx_array
54+
.. autofunction:: is_writeable_array
5455
.. autofunction:: is_numpy_namespace
5556
.. autofunction:: is_cupy_namespace
5657
.. autofunction:: is_torch_namespace

genindex.html

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -305,6 +305,8 @@ <h2>I</h2>
305305
<li><a href="helper-functions.html#array_api_compat.is_torch_array">is_torch_array() (in module array_api_compat)</a>
306306
</li>
307307
<li><a href="helper-functions.html#array_api_compat.is_torch_namespace">is_torch_namespace() (in module array_api_compat)</a>
308+
</li>
309+
<li><a href="helper-functions.html#array_api_compat.is_writeable_array">is_writeable_array() (in module array_api_compat)</a>
308310
</li>
309311
</ul></td>
310312
</tr></table>

helper-functions.html

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -497,6 +497,17 @@ <h2>Inspection Helpers<a class="headerlink" href="#inspection-helpers" title="Li
497497
</div>
498498
</dd></dl>
499499

500+
<dl class="py function">
501+
<dt class="sig sig-object py" id="array_api_compat.is_writeable_array">
502+
<span class="sig-prename descclassname"><span class="pre">array_api_compat.</span></span><span class="sig-name descname"><span class="pre">is_writeable_array</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">x</span></span></em><span class="sig-paren">)</span> <span class="sig-return"><span class="sig-return-icon">&#x2192;</span> <span class="sig-return-typehint"><span class="pre">bool</span></span></span><a class="headerlink" href="#array_api_compat.is_writeable_array" title="Link to this definition"></a></dt>
503+
<dd><p>Return False if <code class="docutils literal notranslate"><span class="pre">x.__setitem__</span></code> is expected to raise; True otherwise.</p>
504+
<div class="admonition warning">
505+
<p class="admonition-title">Warning</p>
506+
<p>As there is no standard way to check if an array is writeable without actually
507+
writing to it, this function blindly returns True for all unknown array types.</p>
508+
</div>
509+
</dd></dl>
510+
500511
<dl class="py function">
501512
<dt class="sig sig-object py" id="array_api_compat.is_numpy_namespace">
502513
<span class="sig-prename descclassname"><span class="pre">array_api_compat.</span></span><span class="sig-name descname"><span class="pre">is_numpy_namespace</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">xp</span></span></em><span class="sig-paren">)</span> <span class="sig-return"><span class="sig-return-icon">&#x2192;</span> <span class="sig-return-typehint"><span class="pre">bool</span></span></span><a class="headerlink" href="#array_api_compat.is_numpy_namespace" title="Link to this definition"></a></dt>
@@ -668,6 +679,7 @@ <h2>Inspection Helpers<a class="headerlink" href="#inspection-helpers" title="Li
668679
<li><a class="reference internal" href="#array_api_compat.is_jax_array"><code class="docutils literal notranslate"><span class="pre">is_jax_array()</span></code></a></li>
669680
<li><a class="reference internal" href="#array_api_compat.is_pydata_sparse_array"><code class="docutils literal notranslate"><span class="pre">is_pydata_sparse_array()</span></code></a></li>
670681
<li><a class="reference internal" href="#array_api_compat.is_ndonnx_array"><code class="docutils literal notranslate"><span class="pre">is_ndonnx_array()</span></code></a></li>
682+
<li><a class="reference internal" href="#array_api_compat.is_writeable_array"><code class="docutils literal notranslate"><span class="pre">is_writeable_array()</span></code></a></li>
671683
<li><a class="reference internal" href="#array_api_compat.is_numpy_namespace"><code class="docutils literal notranslate"><span class="pre">is_numpy_namespace()</span></code></a></li>
672684
<li><a class="reference internal" href="#array_api_compat.is_cupy_namespace"><code class="docutils literal notranslate"><span class="pre">is_cupy_namespace()</span></code></a></li>
673685
<li><a class="reference internal" href="#array_api_compat.is_torch_namespace"><code class="docutils literal notranslate"><span class="pre">is_torch_namespace()</span></code></a></li>

objects.inv

8 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)