@@ -81,45 +81,45 @@ Here is an (incomplete) list of the sorts of ways that array-api-strict is
81
81
strict/minimal:
82
82
83
83
- Only those functions and methods that are [ defined in the
84
- standard] ( https://data-apis.org/array-api/draft /API_specification/index.html )
84
+ standard] ( https://data-apis.org/array-api/latest /API_specification/index.html )
85
85
are included.
86
86
87
87
- In those functions, only the keyword-arguments that are defined by the
88
88
standard are included. All signatures in array-api-strict use
89
89
[ positional-only
90
- arguments] ( https://data-apis.org/array-api/draft /API_specification/function_and_method_signatures.html#function-and-method-signatures ) .
90
+ arguments] ( https://data-apis.org/array-api/latest /API_specification/function_and_method_signatures.html#function-and-method-signatures ) .
91
91
As noted above, only array_api_strict array objects are accepted by
92
92
functions, except in the places where the standard allows Python scalars
93
93
(i.e., functions to not automatically call ` asarray ` on their inputs).
94
94
95
95
- Only those [ dtypes that are defined in the
96
- standard] ( https://data-apis.org/array-api/draft /API_specification/data_types.html )
96
+ standard] ( https://data-apis.org/array-api/latest /API_specification/data_types.html )
97
97
are included.
98
98
99
99
- All functions and methods reject inputs if the standard does not * require*
100
100
the input dtype(s) to be supported. This is one of the most restrictive
101
101
aspects of the library. For example, in NumPy, most transcendental functions
102
102
like ` sin ` will accept integer array inputs, but the [ standard only requires
103
103
them to accept floating-point
104
- inputs] ( https://data-apis.org/array-api/draft /API_specification/generated/array_api.sin.html#array_api.sin ) ,
104
+ inputs] ( https://data-apis.org/array-api/latest /API_specification/generated/array_api.sin.html#array_api.sin ) ,
105
105
so in array-api-strict, ` sin(integer_array) ` will raise an exception.
106
106
107
107
- The
108
- [ indexing] ( https://data-apis.org/array-api/draft /API_specification/indexing.html )
108
+ [ indexing] ( https://data-apis.org/array-api/latest /API_specification/indexing.html )
109
109
semantics required by the standard are not
110
110
111
111
- There are no distinct "scalar" objects as in NumPy. There are only 0-D
112
112
arrays.
113
113
114
114
- Dtype objects are just empty objects that only implement [ equality
115
- comparison] ( https://data-apis.org/array-api/draft /API_specification/generated/array_api.data_types.__eq__.html ) .
115
+ comparison] ( https://data-apis.org/array-api/latest /API_specification/generated/array_api.data_types.__eq__.html ) .
116
116
The way to access dtype objects in the standard is by name, like
117
117
` xp.float32 ` .
118
118
119
119
- The array object type itself is private and should not be accessed.
120
120
Subclassing or otherwise trying to directly initialize this object is not
121
121
supported. Arrays should created with one of the [ array creation
122
- functions] ( https://data-apis.org/array-api/draft /API_specification/creation_functions.html )
122
+ functions] ( https://data-apis.org/array-api/latest /API_specification/creation_functions.html )
123
123
such as ` asarray ` .
124
124
125
125
## Caveats
@@ -144,9 +144,9 @@ issue, but this hasn't necessarily been tested thoroughly.
144
144
` NotImplementedError ` in that case.
145
145
146
146
2 . Since NumPy is a CPU-only library, the [ device
147
- support] ( https://data-apis.org/array-api/draft /design_topics/device_support.html )
147
+ support] ( https://data-apis.org/array-api/latest /design_topics/device_support.html )
148
148
in array-api-strict is superficial only. ` x.device ` is always a (private)
149
- ` _CPU_DEVICE ` object, and ` device ` keywords to creation functions only
149
+ ` CPU_DEVICE ` object, and ` device ` keywords to creation functions only
150
150
accept either this object or ` None ` . A future version of array-api-strict
151
151
[ may add support for a CuPy
152
152
backend] ( https://github.com/data-apis/array-api-strict/issues/5 ) so that
@@ -162,13 +162,13 @@ issue, but this hasn't necessarily been tested thoroughly.
162
162
163
163
4 . There are some behaviors in the standard that are not required to be
164
164
implemented by libraries that cannot support [ data dependent
165
- shapes] ( https://data-apis.org/array-api/draft /design_topics/data_dependent_output_shapes.html ) .
165
+ shapes] ( https://data-apis.org/array-api/latest /design_topics/data_dependent_output_shapes.html ) .
166
166
This includes [ the ` unique_* `
167
- functions] ( https://data-apis.org/array-api/draft /API_specification/set_functions.html ) ,
167
+ functions] ( https://data-apis.org/array-api/latest /API_specification/set_functions.html ) ,
168
168
[ boolean array
169
- indexing] ( https://data-apis.org/array-api/draft /API_specification/indexing.html#boolean-array-indexing ) ,
169
+ indexing] ( https://data-apis.org/array-api/latest /API_specification/indexing.html#boolean-array-indexing ) ,
170
170
and the
171
- [ ` nonzero ` ] ( https://data-apis.org/array-api/draft /API_specification/generated/array_api.nonzero.html )
171
+ [ ` nonzero ` ] ( https://data-apis.org/array-api/latest /API_specification/generated/array_api.nonzero.html )
172
172
function. array-api-strict currently implements all of these. In the
173
173
future, [ there may be a way to disable them] ( https://github.com/data-apis/array-api-strict/issues/7 ) .
174
174
0 commit comments