@@ -15,6 +15,39 @@ implementations for:
1515:mod: `arraycontext ` started life as an array abstraction for use with the
1616:mod: `meshmode ` unstrucuted discretization package.
1717
18+ Design Guidelines
19+ -----------------
20+
21+ Here are some of the guidelines we aim to follow in :mod: `arraycontext `. There
22+ exist numerous other, related efforts, such as the `Python array API standard
23+ <https://data-apis.org/array-api/latest/purpose_and_scope.html> `__. These
24+ points may aid in clarifying and differentiating our objectives.
25+
26+ - The array context is about exposing the common subset of operations
27+ available in immutable and mutable arrays. As a result, the interface
28+ does *not * seek to support interfaces that provide, enable, or are typically
29+ used only with in-place mutation.
30+
31+ For example: The equivalents of :func: `numpy.empty ` were deprecated
32+ and will eventually be removed.
33+
34+ - Each array context offers a specific subset of of :mod: `numpy ` under
35+ :attr: `arraycontext.ArrayContext.np `. Functions under this namespace
36+ must be unconditionally :mod: `numpy `-compatible, that is, they may not
37+ offer an interface beyond what numpy offers. Functions that are
38+ incompatible, for example by supporting tag metadata
39+ (cf. :meth: `arraycontext.ArrayContext.einsum `) should live under the
40+ :class: `~arraycontext.ArrayContext ` directly.
41+
42+ - Similarly, we strive to minimize redundancy between attributes of
43+ :class: `~arraycontext.ArrayContext ` and :attr: `arraycontext.ArrayContext.np `.
44+
45+ For example: ``ArrayContext.empty_like `` was deprecated.
46+
47+ - Array containers are data structures that may contain arrays.
48+ See :mod: `arraycontext.container `. We strive to support these, where sensible,
49+ in :class: `~arraycontext.ArrayContext ` and :attr: `arraycontext.ArrayContext.np `.
50+
1851Contents
1952--------
2053
0 commit comments