You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
<spanclass="sig-prename descclassname"><spanclass="pre">array_api_compat.</span></span><spanclass="sig-name descname"><spanclass="pre">is_lazy_array</span></span><spanclass="sig-paren">(</span><emclass="sig-param"><spanclass="n"><spanclass="pre">x</span></span></em><spanclass="sig-paren">)</span><spanclass="sig-return"><spanclass="sig-return-icon">→</span><spanclass="sig-return-typehint"><spanclass="pre">bool</span></span></span><aclass="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 <codeclass="docutils literal notranslate"><spanclass="pre">bool(x)</span></code> or <codeclass="docutils literal notranslate"><spanclass="pre">float(x)</span></code>.</p>
519
+
<p>Return False otherwise; e.g. <codeclass="docutils literal notranslate"><spanclass="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
+
<divclass="admonition note">
522
+
<pclass="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>
<spanclass="sig-prename descclassname"><spanclass="pre">array_api_compat.</span></span><spanclass="sig-name descname"><spanclass="pre">is_numpy_namespace</span></span><spanclass="sig-paren">(</span><emclass="sig-param"><spanclass="n"><spanclass="pre">xp</span></span></em><spanclass="sig-paren">)</span><spanclass="sig-return"><spanclass="sig-return-icon">→</span><spanclass="sig-return-typehint"><spanclass="pre">bool</span></span></span><aclass="headerlink" href="#array_api_compat.is_numpy_namespace" title="Link to this definition">¶</a></dt>
0 commit comments