Skip to content

Commit c2967ea

Browse files
committed
Deploying to gh-pages from @ 9631f32 🚀
1 parent 0b8436d commit c2967ea

File tree

3 files changed

+7
-7
lines changed

3 files changed

+7
-7
lines changed

generated/array_api_extra.at.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -399,7 +399,7 @@ <h1>array_api_extra.at<a class="headerlink" href="#array-api-extra-at" title="Li
399399
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="gp">&gt;&gt;&gt; </span><span class="n">x</span> <span class="o">=</span> <span class="n">x</span><span class="o">.</span><span class="n">at</span><span class="p">[</span><span class="mi">1</span><span class="p">]</span><span class="o">.</span><span class="n">add</span><span class="p">(</span><span class="mi">2</span><span class="p">)</span>
400400
</pre></div>
401401
</div>
402-
<p>If x is a read-only numpy array, they are the same as:</p>
402+
<p>If x is a read-only NumPy array, they are the same as:</p>
403403
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="gp">&gt;&gt;&gt; </span><span class="n">x</span> <span class="o">=</span> <span class="n">x</span><span class="o">.</span><span class="n">copy</span><span class="p">()</span>
404404
<span class="gp">&gt;&gt;&gt; </span><span class="n">x</span><span class="p">[</span><span class="mi">1</span><span class="p">]</span> <span class="o">+=</span> <span class="mi">2</span>
405405
</pre></div>

generated/array_api_extra.lazy_apply.html

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -291,7 +291,7 @@ <h1>array_api_extra.lazy_apply<a class="headerlink" href="#array-api-extra-lazy-
291291
</p></li>
292292
<li><p><strong>*args</strong> (<em>Array</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><a class="reference external" href="https://docs.python.org/3/library/functions.html#float" title="(in Python v3.13)"><em>float</em></a><em> | </em><a class="reference external" href="https://docs.python.org/3/library/functions.html#complex" title="(in Python v3.13)"><em>complex</em></a><em> | </em><a class="reference external" href="https://docs.python.org/3/library/functions.html#bool" title="(in Python v3.13)"><em>bool</em></a><em> | </em><em>None</em>) – <p>One or more Array API compliant arrays, Python scalars, or None’s.</p>
293293
<p>If <cite>as_numpy=True</cite>, you need to be able to apply <a class="reference external" href="https://numpy.org/doc/stable/reference/generated/numpy.asarray.html#numpy.asarray" title="(in NumPy v2.2)"><code class="xref py py-func docutils literal notranslate"><span class="pre">numpy.asarray()</span></code></a> to
294-
non-None args to convert them to numpy; read notes below about specific
294+
non-None args to convert them to NumPy; read notes below about specific
295295
backends.</p>
296296
</p></li>
297297
<li><p><strong>shape</strong> (<a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#tuple" title="(in Python v3.13)"><em>tuple</em></a><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><em>None</em><em>, </em><em>...</em><em>] </em><em>| </em><em>Sequence</em><em>[</em><a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#tuple" title="(in Python v3.13)"><em>tuple</em></a><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><em>None</em><em>, </em><em>...</em><em>]</em><em>]</em><em>, </em><em>optional</em>) – Output shape or sequence of output shapes, one for each output of <cite>func</cite>.
@@ -300,7 +300,7 @@ <h1>array_api_extra.lazy_apply<a class="headerlink" href="#array-api-extra-lazy-
300300
dtype(s) must belong to the same array namespace as the input arrays.
301301
Default: infer the result type(s) from the input arrays.</p></li>
302302
<li><p><strong>as_numpy</strong> (<a class="reference external" href="https://docs.python.org/3/library/functions.html#bool" title="(in Python v3.13)"><em>bool</em></a><em>, </em><em>optional</em>) – <dl class="simple">
303-
<dt>If True, convert the input arrays to NumPy before passing them to <cite>func</cite>.</dt><dd><p>This is particularly useful to make numpy-only functions, e.g. written in Cython</p>
303+
<dt>If True, convert the input arrays to NumPy before passing them to <cite>func</cite>.</dt><dd><p>This is particularly useful to make NumPy-only functions, e.g. written in Cython</p>
304304
</dd>
305305
<dt>or Numba, work transparently with array API-compliant arrays.</dt><dd><p>Default: False.</p>
306306
</dd>
@@ -344,8 +344,8 @@ <h1>array_api_extra.lazy_apply<a class="headerlink" href="#array-api-extra-lazy-
344344
<dt>Sparse</dt><dd><p>If <code class="docutils literal notranslate"><span class="pre">as_numpy=True</span></code>, by default sparse prevents implicit densification through
345345
<a class="reference external" href="https://numpy.org/doc/stable/reference/generated/numpy.asarray.html#numpy.asarray" title="(in NumPy v2.2)"><code class="xref py py-func docutils literal notranslate"><span class="pre">numpy.asarray()</span></code></a>. <a class="reference external" href="https://sparse.pydata.org/en/stable/operations.html#package-configuration">This safety mechanism can be disabled</a>.</p>
346346
</dd>
347-
<dt>Dask</dt><dd><p>This allows applying eager functions to dask arrays.
348-
The dask graph won’t be computed.</p>
347+
<dt>Dask</dt><dd><p>This allows applying eager functions to Dask arrays.
348+
The Dask graph won’t be computed.</p>
349349
<p><cite>lazy_apply</cite> doesn’t know if <cite>func</cite> reduces along any axes; also, shape
350350
changes are non-trivial in chunked Dask arrays. For these reasons, all inputs
351351
will be rechunked into a single chunk.</p>

generated/array_api_extra.testing.lazy_xp_function.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -287,11 +287,11 @@ <h1>array_api_extra.testing.lazy_xp_function<a class="headerlink" href="#array-a
287287
<li><p><strong>func</strong> (<em>callable</em>) – Function to be tested.</p></li>
288288
<li><p><strong>allow_dask_compute</strong> (<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><em>optional</em>) – <p>Number of times <cite>func</cite> is allowed to internally materialize the Dask graph. This
289289
is typically triggered by <code class="docutils literal notranslate"><span class="pre">bool()</span></code>, <code class="docutils literal notranslate"><span class="pre">float()</span></code>, or <code class="docutils literal notranslate"><span class="pre">np.asarray()</span></code>.</p>
290-
<p>Set to 1 if you are aware that <cite>func</cite> converts the input parameters to numpy and
290+
<p>Set to 1 if you are aware that <cite>func</cite> converts the input parameters to NumPy and
291291
want to let it do so at least for the time being, knowing that it is going to be
292292
extremely detrimental for performance.</p>
293293
<p>If a test needs values higher than 1 to pass, it is a canary that the conversion
294-
to numpy/bool/float is happening multiple times, which translates to multiple
294+
to NumPy/bool/float is happening multiple times, which translates to multiple
295295
computations of the whole graph. Short of making the function fully lazy, you
296296
should at least add explicit calls to <code class="docutils literal notranslate"><span class="pre">np.asarray()</span></code> early in the function.
297297
<em>Note:</em> the counter of <cite>allow_dask_compute</cite> resets after each call to <cite>func</cite>, so

0 commit comments

Comments
 (0)