Skip to content

Commit 9d8217a

Browse files
committed
Deploying to gh-pages from @ d58d137 🚀
1 parent 76d8120 commit 9d8217a

File tree

3 files changed

+36
-29
lines changed

3 files changed

+36
-29
lines changed

_sources/index.md.txt

Lines changed: 19 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ And
4040
[on conda-forge](https://prefix.dev/channels/conda-forge/packages/array-api-extra):
4141

4242
```shell
43-
micromamba install -c https://repo.prefix.dev/conda-forge array-api-extra
43+
mamba install array-api-extra
4444
# or
4545
pixi add array-api-extra
4646
```
@@ -122,9 +122,12 @@ return xpx.atleast_nd(y, ndim=2, xp=xp)
122122

123123
```{note}
124124
Functions in this library assume input arrays *are arrays* (not "array-likes") and that
125-
the namespace passed as `xp` is compatible with the standard. This means that
126-
the namespace you pass as `xp` should come from array-api-compat's ``array_namespace``,
125+
the namespace passed as `xp` (if given) is compatible with the standard -
126+
this means that it should come from array-api-compat's `array_namespace`,
127127
or otherwise be compatible with the standard.
128+
129+
Calling functions without providing an `xp` argument means that `array_namespace`
130+
is called internally to determine the namespace.
128131
```
129132

130133
In the examples shown in the docstrings of functions from this library,
@@ -133,6 +136,9 @@ array namespace `xp`. In reality, code using this library will be written to
133136
work with any compatible array namespace as `xp`, not any particular
134137
implementation.
135138

139+
Some functions may only work with array libraries supported by array-api-compat.
140+
This will be clearly indicated in the docs.
141+
136142
(scope)=
137143

138144
## Scope
@@ -143,11 +149,15 @@ Functions that are in-scope for this library will:
143149
standard.
144150
- Implement functionality which may be generally useful across various
145151
libraries.
146-
- Be implemented purely in terms of the array API standard.
147152
- Be implemented with type annotations and
148153
[numpydoc-style docstrings](https://numpydoc.readthedocs.io/en/latest/format.html).
149154
- Be tested against `array-api-strict`.
150155

156+
Functions are implemented purely in terms of the array API standard where
157+
possible. Where functions must use library-specific helpers for libraries
158+
supported by array-api-compat, this will be clearly marked in their API
159+
reference page.
160+
151161
In particular, the following kinds of function are also in-scope:
152162

153163
- Functions which implement
@@ -158,20 +168,15 @@ In particular, the following kinds of function are also in-scope:
158168

159169
The following features are currently out-of-scope for this library:
160170

161-
- Delegation to known, existing array libraries.
171+
- Delegation to known, existing array libraries (unless necessary).
162172
- It is quite simple to wrap functions in this library to also use existing
163-
implementations where possible. Such delegation will not live in this
164-
library for now, but the array-agnostic functions in this library could form
165-
an array-agnostic backend for such delegating functions in the future, here
166-
or elsewhere.
173+
implementations. Such delegation will not live in this library for now, but
174+
the array-agnostic functions in this library could form an array-agnostic
175+
backend for such delegating functions in the future, here or elsewhere.
167176
- Functions which accept "array-like" input, or standard-incompatible
168177
namespaces.
169178
- It is possible to prepare input arrays and a standard-compatible namespace
170-
via `array-api-compat` downstream in consumer libraries. Avoiding use of
171-
`array-api-compat` in this library makes it easier to vendor and reduces
172-
potential redundant calls to `xp.asarray` and `array_namespace`.
173-
- For proposed alternatives to the `xp=xp` interface, see
174-
[this issue](https://github.com/data-apis/array-api-extra/issues/6).
179+
via `array-api-compat` downstream in consumer libraries.
175180
- Functions which are specific to a particular domain.
176181
- These functions may belong better in an array-consuming library which is
177182
specific to that domain.

index.html

Lines changed: 16 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -284,7 +284,7 @@ <h1>array-api-extra<a class="headerlink" href="#array-api-extra" title="Link to
284284
</div>
285285
<p>And
286286
<a class="reference external" href="https://prefix.dev/channels/conda-forge/packages/array-api-extra">on conda-forge</a>:</p>
287-
<div class="highlight-shell notranslate"><div class="highlight"><pre><span></span>micromamba<span class="w"> </span>install<span class="w"> </span>-c<span class="w"> </span>https://repo.prefix.dev/conda-forge<span class="w"> </span>array-api-extra
287+
<div class="highlight-shell notranslate"><div class="highlight"><pre><span></span>mamba<span class="w"> </span>install<span class="w"> </span>array-api-extra
288288
<span class="c1"># or</span>
289289
pixi<span class="w"> </span>add<span class="w"> </span>array-api-extra
290290
</pre></div>
@@ -358,15 +358,19 @@ <h1>array-api-extra<a class="headerlink" href="#array-api-extra" title="Link to
358358
<div class="admonition note">
359359
<p class="admonition-title">Note</p>
360360
<p>Functions in this library assume input arrays <em>are arrays</em> (not “array-likes”) and that
361-
the namespace passed as <code class="docutils literal notranslate"><span class="pre">xp</span></code> is compatible with the standard. This means that
362-
the namespace you pass as <code class="docutils literal notranslate"><span class="pre">xp</span></code> should come from array-api-compat’s <code class="docutils literal notranslate"><span class="pre">array_namespace</span></code>,
361+
the namespace passed as <code class="docutils literal notranslate"><span class="pre">xp</span></code> (if given) is compatible with the standard -
362+
this means that it should come from array-api-compat’s <code class="docutils literal notranslate"><span class="pre">array_namespace</span></code>,
363363
or otherwise be compatible with the standard.</p>
364+
<p>Calling functions without providing an <code class="docutils literal notranslate"><span class="pre">xp</span></code> argument means that <code class="docutils literal notranslate"><span class="pre">array_namespace</span></code>
365+
is called internally to determine the namespace.</p>
364366
</div>
365367
<p>In the examples shown in the docstrings of functions from this library,
366368
<a class="reference external" href="https://data-apis.org/array-api-strict/"><code class="docutils literal notranslate"><span class="pre">array-api-strict</span></code></a> is used as the
367369
array namespace <code class="docutils literal notranslate"><span class="pre">xp</span></code>. In reality, code using this library will be written to
368370
work with any compatible array namespace as <code class="docutils literal notranslate"><span class="pre">xp</span></code>, not any particular
369371
implementation.</p>
372+
<p>Some functions may only work with array libraries supported by array-api-compat.
373+
This will be clearly indicated in the docs.</p>
370374
</section>
371375
<section id="scope">
372376
<span id="id4"></span><h2>Scope<a class="headerlink" href="#scope" title="Link to this heading"></a></h2>
@@ -376,11 +380,14 @@ <h1>array-api-extra<a class="headerlink" href="#array-api-extra" title="Link to
376380
standard.</p></li>
377381
<li><p>Implement functionality which may be generally useful across various
378382
libraries.</p></li>
379-
<li><p>Be implemented purely in terms of the array API standard.</p></li>
380383
<li><p>Be implemented with type annotations and
381384
<a class="reference external" href="https://numpydoc.readthedocs.io/en/latest/format.html">numpydoc-style docstrings</a>.</p></li>
382385
<li><p>Be tested against <code class="docutils literal notranslate"><span class="pre">array-api-strict</span></code>.</p></li>
383386
</ul>
387+
<p>Functions are implemented purely in terms of the array API standard where
388+
possible. Where functions must use library-specific helpers for libraries
389+
supported by array-api-compat, this will be clearly marked in their API
390+
reference page.</p>
384391
<p>In particular, the following kinds of function are also in-scope:</p>
385392
<ul class="simple">
386393
<li><p>Functions which implement
@@ -391,24 +398,19 @@ <h1>array-api-extra<a class="headerlink" href="#array-api-extra" title="Link to
391398
</ul>
392399
<p>The following features are currently out-of-scope for this library:</p>
393400
<ul class="simple">
394-
<li><p>Delegation to known, existing array libraries.</p>
401+
<li><p>Delegation to known, existing array libraries (unless necessary).</p>
395402
<ul>
396403
<li><p>It is quite simple to wrap functions in this library to also use existing
397-
implementations where possible. Such delegation will not live in this
398-
library for now, but the array-agnostic functions in this library could form
399-
an array-agnostic backend for such delegating functions in the future, here
400-
or elsewhere.</p></li>
404+
implementations. Such delegation will not live in this library for now, but
405+
the array-agnostic functions in this library could form an array-agnostic
406+
backend for such delegating functions in the future, here or elsewhere.</p></li>
401407
</ul>
402408
</li>
403409
<li><p>Functions which accept “array-like” input, or standard-incompatible
404410
namespaces.</p>
405411
<ul>
406412
<li><p>It is possible to prepare input arrays and a standard-compatible namespace
407-
via <code class="docutils literal notranslate"><span class="pre">array-api-compat</span></code> downstream in consumer libraries. Avoiding use of
408-
<code class="docutils literal notranslate"><span class="pre">array-api-compat</span></code> in this library makes it easier to vendor and reduces
409-
potential redundant calls to <code class="docutils literal notranslate"><span class="pre">xp.asarray</span></code> and <code class="docutils literal notranslate"><span class="pre">array_namespace</span></code>.</p></li>
410-
<li><p>For proposed alternatives to the <code class="docutils literal notranslate"><span class="pre">xp=xp</span></code> interface, see
411-
<a class="reference external" href="https://github.com/data-apis/array-api-extra/issues/6">this issue</a>.</p></li>
413+
via <code class="docutils literal notranslate"><span class="pre">array-api-compat</span></code> downstream in consumer libraries.</p></li>
412414
</ul>
413415
</li>
414416
<li><p>Functions which are specific to a particular domain.</p>

0 commit comments

Comments
 (0)