Skip to content

Commit d58d137

Browse files
authored
DOC: update scope (#57)
1 parent ee12cd1 commit d58d137

File tree

1 file changed

+19
-14
lines changed

1 file changed

+19
-14
lines changed

docs/index.md

+19-14
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.

0 commit comments

Comments
 (0)