Skip to content

Commit 64cad4b

Browse files
authored
[Docs] Fix minor rendering bugs (#196)
* [Docs] Fix indendation and rendering of Rationale * add link for gh-1 * [Docs] Fix rendering of interchange mechanisms
1 parent 63c592e commit 64cad4b

File tree

3 files changed

+13
-5
lines changed

3 files changed

+13
-5
lines changed

spec/design_topics/data_interchange.md

+8
Original file line numberDiff line numberDiff line change
@@ -12,20 +12,28 @@ The interchange mechanism must offer the following:
1212

1313
1. Data access via a protocol that describes the memory layout of the array
1414
in an implementation-independent manner.
15+
1516
_Rationale: any number of libraries must be able to exchange data, and no
1617
particular package must be needed to do so._
18+
1719
2. Support for all dtypes in this API standard (see {ref}`data-types`).
20+
1821
3. Device support. It must be possible to determine on what device the array
1922
that is to be converted lives.
23+
2024
_Rationale: there are CPU-only, GPU-only, and multi-device array types;
2125
it's best to support these with a single protocol (with separate
2226
per-device protocols it's hard to figure out unambiguous rules for which
2327
protocol gets used, and the situation will get more complex over time
2428
as TPU's and other accelerators become more widely available)._
29+
2530
4. Zero-copy semantics where possible, making a copy only if needed (e.g.
2631
when data is not contiguous in memory).
32+
2733
_Rationale: performance._
34+
2835
5. A Python-side and a C-side interface, the latter with a stable C ABI.
36+
2937
_Rationale: all prominent existing array libraries are implemented in
3038
C/C++, and are released independently from each other. Hence a stable C
3139
ABI is required for packages to work well together._

spec/purpose_and_scope.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -187,10 +187,10 @@ extensions are dealt with_):
187187

188188
7. Behaviour for unexpected/invalid input to functions and methods.
189189

190-
_Rationale: there are a huge amount of ways in which users can provide
191-
invalid or unspecified input to functionality in the standard. Exception
192-
types or other resulting behaviour cannot be completely covered and would
193-
be hard to make consistent between libraries._
190+
_Rationale: there are a huge amount of ways in which users can provide
191+
invalid or unspecified input to functionality in the standard. Exception
192+
types or other resulting behaviour cannot be completely covered and would
193+
be hard to make consistent between libraries._
194194

195195

196196
**Non-goals** for the API standard include:

spec/use_cases.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ parallelism in some algorithms. However SciPy itself will not directly start
5050
depending on a GPU or distributed array implementation, or contain (e.g.)
5151
CUDA code - that's not maintainable given the resources for development.
5252
_However_, there is a way to provide distributed or GPU support. Part of the
53-
solution is provided by NumPy's "array protocols" (see gh-1), that allow
53+
solution is provided by NumPy's "array protocols" (see [gh-1](https://github.com/data-apis/array-api/issues/1)), that allow
5454
dispatching to other array implementations. The main problem then becomes how
5555
to know whether this will work with a particular distributed or GPU array
5656
implementation - given that there are zero other array implementations that

0 commit comments

Comments
 (0)