Skip to content

Commit 6d68a97

Browse files
committed
Deploying to gh-pages from @ 5ef0e18 🚀
1 parent 098d21b commit 6d68a97

File tree

5 files changed

+20
-1
lines changed

5 files changed

+20
-1
lines changed

_sources/helper-functions.rst.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@ yet.
5252
.. autofunction:: is_pydata_sparse_array
5353
.. autofunction:: is_ndonnx_array
5454
.. autofunction:: is_writeable_array
55+
.. autofunction:: is_lazy_array
5556
.. autofunction:: is_numpy_namespace
5657
.. autofunction:: is_cupy_namespace
5758
.. autofunction:: is_torch_namespace

genindex.html

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -287,6 +287,8 @@ <h2>I</h2>
287287
<li><a href="helper-functions.html#array_api_compat.is_jax_array">is_jax_array() (in module array_api_compat)</a>
288288
</li>
289289
<li><a href="helper-functions.html#array_api_compat.is_jax_namespace">is_jax_namespace() (in module array_api_compat)</a>
290+
</li>
291+
<li><a href="helper-functions.html#array_api_compat.is_lazy_array">is_lazy_array() (in module array_api_compat)</a>
290292
</li>
291293
</ul></td>
292294
<td style="width: 33%; vertical-align: top;"><ul>

helper-functions.html

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -510,6 +510,21 @@ <h2>Inspection Helpers<a class="headerlink" href="#inspection-helpers" title="Li
510510
</div>
511511
</dd></dl>
512512

513+
<dl class="py function">
514+
<dt class="sig sig-object py" id="array_api_compat.is_lazy_array">
515+
<span class="sig-prename descclassname"><span class="pre">array_api_compat.</span></span><span class="sig-name descname"><span class="pre">is_lazy_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_lazy_array" title="Link to this definition"></a></dt>
516+
<dd><p>Return True if x is potentially a future or it may be otherwise impossible or
517+
expensive to eagerly read its contents, regardless of their size, e.g. by
518+
calling <code class="docutils literal notranslate"><span class="pre">bool(x)</span></code> or <code class="docutils literal notranslate"><span class="pre">float(x)</span></code>.</p>
519+
<p>Return False otherwise; e.g. <code class="docutils literal notranslate"><span class="pre">bool(x)</span></code> etc. is guaranteed to succeed and to be
520+
cheap as long as the array has the right dtype and size.</p>
521+
<div class="admonition note">
522+
<p class="admonition-title">Note</p>
523+
<p>This function errs on the side of caution for array types that may or may not be
524+
lazy, e.g. JAX arrays, by always returning True for them.</p>
525+
</div>
526+
</dd></dl>
527+
513528
<dl class="py function">
514529
<dt class="sig sig-object py" id="array_api_compat.is_numpy_namespace">
515530
<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>
@@ -682,6 +697,7 @@ <h2>Inspection Helpers<a class="headerlink" href="#inspection-helpers" title="Li
682697
<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>
683698
<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>
684699
<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>
700+
<li><a class="reference internal" href="#array_api_compat.is_lazy_array"><code class="docutils literal notranslate"><span class="pre">is_lazy_array()</span></code></a></li>
685701
<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>
686702
<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>
687703
<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

5 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)