You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
<li><p><strong>api_version</strong> (<em>str, optional</em>) – The version of the standard to use. Supported versions are:
333
-
<codeclass="docutils literal notranslate"><spanclass="pre">('2021.12',</span><spanclass="pre">'2022.12',</span><spanclass="pre">'2023.12')</span></code>. The default version number is
<codeclass="docutils literal notranslate"><spanclass="pre">('2021.12',</span><spanclass="pre">'2022.12',</span><spanclass="pre">'2023.12')</span></code>, plus the draft version <codeclass="docutils literal notranslate"><spanclass="pre">2024.12</span></code>.
334
+
The default version number is <codeclass="docutils literal notranslate"><spanclass="pre">'2023.12'</span></code>.</p>
335
335
<p>Note that 2021.12 is supported, but currently gives the same thing as
336
336
2022.12 (except that the fft extension will be disabled).</p>
<h1>Changelog<aclass="headerlink" href="#changelog" title="Link to this heading">¶</a></h1>
248
248
<sectionid="id1">
249
-
<h2>2.1.3 (2024-11-08)<aclass="headerlink" href="#id1" title="Link to this heading">¶</a></h2>
250
-
</section>
249
+
<h2>2.2 (2024-11-11)<aclass="headerlink" href="#id1" title="Link to this heading">¶</a></h2>
251
250
<sectionid="major-changes">
252
-
<h2>Major Changes<aclass="headerlink" href="#major-changes" title="Link to this heading">¶</a></h2>
251
+
<h3>Major Changes<aclass="headerlink" href="#major-changes" title="Link to this heading">¶</a></h3>
252
+
<ul>
253
+
<li><p>Preliminary support for the draft 2024.12 version of the standard is now
254
+
implemented. This is disabled by default, but can be enabled with the <aclass="reference internal" href="api.html#array-api-strict-flags"><spanclass="std std-ref">flags
255
+
API</span></a>, e.g., by calling
256
+
<codeclass="docutils literal notranslate"><spanclass="pre">set_array_api_strict_flags(api_version='2024.12')</span></code> or setting
<li><p>The <codeclass="docutils literal notranslate"><spanclass="pre">'max</span><spanclass="pre">dimensions'</span></code> key of <codeclass="docutils literal notranslate"><spanclass="pre">__array_namespace_info__().capabilities()</span></code>.</p></li>
268
+
</ul>
269
+
<p>Some planned changes to the 2024.12 standard, including scalar support for
270
+
array functions, is not yet implemented but will be in a future version.</p>
271
+
</li>
272
+
</ul>
273
+
</section>
274
+
<sectionid="minor-changes">
275
+
<h3>Minor Changes<aclass="headerlink" href="#minor-changes" title="Link to this heading">¶</a></h3>
276
+
<ulclass="simple">
277
+
<li><p><codeclass="docutils literal notranslate"><spanclass="pre">__array_namespace_info__()</span></code> now returns a class instead of a module. This
278
+
prevents extraneous names that aren’t part of the standard from appearing on
279
+
it.</p></li>
280
+
</ul>
281
+
</section>
282
+
</section>
283
+
<sectionid="id2">
284
+
<h2>2.1.3 (2024-11-08)<aclass="headerlink" href="#id2" title="Link to this heading">¶</a></h2>
285
+
<sectionid="id3">
286
+
<h3>Major Changes<aclass="headerlink" href="#id3" title="Link to this heading">¶</a></h3>
253
287
<ulclass="simple">
254
288
<li><p>Revert the change to require NumPy >= 2.1 and Python >= 3.10 from
255
289
array-api-strict 2.1.2. array-api-strict now requires NumPy >= 1.21 and
@@ -263,19 +297,20 @@ <h2>Major Changes<a class="headerlink" href="#major-changes" title="Link to this
263
297
more discussion about this.</p></li>
264
298
</ul>
265
299
</section>
266
-
<sectionid="id2">
267
-
<h2>2.1.2 (2024-11-07)<aclass="headerlink" href="#id2" title="Link to this heading">¶</a></h2>
268
300
</section>
269
-
<sectionid="id3">
270
-
<h2>Major Changes<aclass="headerlink" href="#id3" title="Link to this heading">¶</a></h2>
301
+
<sectionid="id4">
302
+
<h2>2.1.2 (2024-11-07)<aclass="headerlink" href="#id4" title="Link to this heading">¶</a></h2>
303
+
<sectionid="id5">
304
+
<h3>Major Changes<aclass="headerlink" href="#id5" title="Link to this heading">¶</a></h3>
271
305
<ulclass="simple">
272
306
<li><p>array-api-strict now requires NumPy >= 2.1 and Python >= 3.10</p></li>
273
307
</ul>
274
308
</section>
275
-
<sectionid="id4">
276
-
<h2>2.1.1 (2024-11-07)<aclass="headerlink" href="#id4" title="Link to this heading">¶</a></h2>
277
-
<sectionid="id5">
278
-
<h3>Major Changes<aclass="headerlink" href="#id5" title="Link to this heading">¶</a></h3>
309
+
</section>
310
+
<sectionid="id6">
311
+
<h2>2.1.1 (2024-11-07)<aclass="headerlink" href="#id6" title="Link to this heading">¶</a></h2>
312
+
<sectionid="id7">
313
+
<h3>Major Changes<aclass="headerlink" href="#id7" title="Link to this heading">¶</a></h3>
279
314
<ulclass="simple">
280
315
<li><p>Remove the <codeclass="docutils literal notranslate"><spanclass="pre">__array__</span></code> method from array-api-strict arrays. This means they
281
316
will no longer be implicitly converted to NumPy arrays when passed to <codeclass="docutils literal notranslate"><spanclass="pre">np</span></code>
@@ -284,8 +319,8 @@ <h3>Major Changes<a class="headerlink" href="#id5" title="Link to this heading">
284
319
strict array to a NumPy array, use <codeclass="docutils literal notranslate"><spanclass="pre">np.from_dlpack(x)</span></code></p></li>
285
320
</ul>
286
321
</section>
287
-
<sectionid="minor-changes">
288
-
<h3>Minor Changes<aclass="headerlink" href="#minor-changes" title="Link to this heading">¶</a></h3>
322
+
<sectionid="id8">
323
+
<h3>Minor Changes<aclass="headerlink" href="#id8" title="Link to this heading">¶</a></h3>
289
324
<ulclass="simple">
290
325
<li><p>Use a more robust implementation of <codeclass="docutils literal notranslate"><spanclass="pre">clip()</span></code> that handles corner cases better.</p></li>
291
326
<li><p>Fix the definition of <codeclass="docutils literal notranslate"><spanclass="pre">sign()</span></code> for complex numbers when using NumPy 1.x.</p></li>
@@ -296,10 +331,10 @@ <h3>Minor Changes<a class="headerlink" href="#minor-changes" title="Link to this
296
331
</ul>
297
332
</section>
298
333
</section>
299
-
<sectionid="id6">
300
-
<h2>2.1 (2024-10-18)<aclass="headerlink" href="#id6" title="Link to this heading">¶</a></h2>
301
-
<sectionid="id7">
302
-
<h3>Major Changes<aclass="headerlink" href="#id7" title="Link to this heading">¶</a></h3>
334
+
<sectionid="id9">
335
+
<h2>2.1 (2024-10-18)<aclass="headerlink" href="#id9" title="Link to this heading">¶</a></h2>
336
+
<sectionid="id10">
337
+
<h3>Major Changes<aclass="headerlink" href="#id10" title="Link to this heading">¶</a></h3>
303
338
<ulclass="simple">
304
339
<li><p>The default version of the array API standard is now 2023.12. 2022.12 can
305
340
still be enabled via the <aclass="reference internal" href="api.html#array-api-strict-flags"><spanclass="std std-ref">flags API</span></a>.</p></li>
@@ -315,18 +350,18 @@ <h3>Major Changes<a class="headerlink" href="#id7" title="Link to this heading">
315
350
exception. (Thanks to <aclass="reference external" href="https://github.com/betatim">@betatim</a>).</p></li>
316
351
</ul>
317
352
</section>
318
-
<sectionid="id8">
319
-
<h3>Minor Changes<aclass="headerlink" href="#id8" title="Link to this heading">¶</a></h3>
353
+
<sectionid="id11">
354
+
<h3>Minor Changes<aclass="headerlink" href="#id11" title="Link to this heading">¶</a></h3>
320
355
<ulclass="simple">
321
356
<li><p>Avoid implicitly relying on <codeclass="docutils literal notranslate"><spanclass="pre">__array__</span></code> in some places. These changes should
322
357
not be usef visible.</p></li>
323
358
</ul>
324
359
</section>
325
360
</section>
326
-
<sectionid="id9">
327
-
<h2>2.0.1 (2024-07-01)<aclass="headerlink" href="#id9" title="Link to this heading">¶</a></h2>
328
-
<sectionid="id10">
329
-
<h3>Minor Changes<aclass="headerlink" href="#id10" title="Link to this heading">¶</a></h3>
361
+
<sectionid="id12">
362
+
<h2>2.0.1 (2024-07-01)<aclass="headerlink" href="#id12" title="Link to this heading">¶</a></h2>
363
+
<sectionid="id13">
364
+
<h3>Minor Changes<aclass="headerlink" href="#id13" title="Link to this heading">¶</a></h3>
330
365
<ulclass="simple">
331
366
<li><p>Re-allow iteration on 1-D arrays. A change from 2.0 fixed iter() raising on
332
367
n-D arrays but also made 1-D arrays raise. The standard does not explicitly
@@ -335,10 +370,10 @@ <h3>Minor Changes<a class="headerlink" href="#id10" title="Link to this heading"
335
370
</ul>
336
371
</section>
337
372
</section>
338
-
<sectionid="id11">
339
-
<h2>2.0 (2024-06-27)<aclass="headerlink" href="#id11" title="Link to this heading">¶</a></h2>
340
-
<sectionid="id12">
341
-
<h3>Major Changes<aclass="headerlink" href="#id12" title="Link to this heading">¶</a></h3>
373
+
<sectionid="id14">
374
+
<h2>2.0 (2024-06-27)<aclass="headerlink" href="#id14" title="Link to this heading">¶</a></h2>
375
+
<sectionid="id15">
376
+
<h3>Major Changes<aclass="headerlink" href="#id15" title="Link to this heading">¶</a></h3>
342
377
<ulclass="simple">
343
378
<li><p>array-api-strict has a new set of <aclass="reference internal" href="api.html#array-api-strict-flags"><spanclass="std std-ref">flags</span></a> that can
344
379
be used to dynamically enable or disable features in array-api-strict. These
@@ -357,23 +392,23 @@ <h3>Major Changes<a class="headerlink" href="#id12" title="Link to this heading"
357
392
change the default version to 2023.12.</p></li>
358
393
</ul>
359
394
</section>
360
-
<sectionid="id13">
361
-
<h3>Minor Changes<aclass="headerlink" href="#id13" title="Link to this heading">¶</a></h3>
395
+
<sectionid="id16">
396
+
<h3>Minor Changes<aclass="headerlink" href="#id16" title="Link to this heading">¶</a></h3>
362
397
<ulclass="simple">
363
398
<li><p>Calling <codeclass="docutils literal notranslate"><spanclass="pre">iter()</span></code> on an array now correctly raises <codeclass="docutils literal notranslate"><spanclass="pre">TypeError</span></code>.</p></li>
364
399
<li><p>Add some missing names to <codeclass="docutils literal notranslate"><spanclass="pre">__all__</span></code>.</p></li>
365
400
</ul>
366
401
</section>
367
402
</section>
368
-
<sectionid="id14">
369
-
<h2>1.1.1 (2024-04-29)<aclass="headerlink" href="#id14" title="Link to this heading">¶</a></h2>
403
+
<sectionid="id17">
404
+
<h2>1.1.1 (2024-04-29)<aclass="headerlink" href="#id17" title="Link to this heading">¶</a></h2>
370
405
<ulclass="simple">
371
406
<li><p>Fix the <codeclass="docutils literal notranslate"><spanclass="pre">api_version</span></code> argument to <codeclass="docutils literal notranslate"><spanclass="pre">__array_namespace__</span></code> to accept
372
407
<codeclass="docutils literal notranslate"><spanclass="pre">'2021.12'</span></code> or <codeclass="docutils literal notranslate"><spanclass="pre">'2022.12'</span></code>.</p></li>
373
408
</ul>
374
409
</section>
375
-
<sectionid="id15">
376
-
<h2>1.1 (2024-04-08)<aclass="headerlink" href="#id15" title="Link to this heading">¶</a></h2>
410
+
<sectionid="id18">
411
+
<h2>1.1 (2024-04-08)<aclass="headerlink" href="#id18" title="Link to this heading">¶</a></h2>
377
412
<ulclass="simple">
378
413
<li><p>Fix the <codeclass="docutils literal notranslate"><spanclass="pre">copy</span></code> flag in <codeclass="docutils literal notranslate"><spanclass="pre">__array__</span></code> for NumPy 2.0.</p></li>
379
414
<li><p>Add full <codeclass="docutils literal notranslate"><spanclass="pre">copy=False</span></code> support to <codeclass="docutils literal notranslate"><spanclass="pre">asarray()</span></code>. This is emulated in NumPy 1.26 by creating
@@ -382,8 +417,8 @@ <h2>1.1 (2024-04-08)<a class="headerlink" href="#id15" title="Link to this headi
382
417
<li><p>Add broadcasting support to <codeclass="docutils literal notranslate"><spanclass="pre">cross</span></code>.</p></li>
383
418
</ul>
384
419
</section>
385
-
<sectionid="id16">
386
-
<h2>1.0 (2024-01-24)<aclass="headerlink" href="#id16" title="Link to this heading">¶</a></h2>
420
+
<sectionid="id19">
421
+
<h2>1.0 (2024-01-24)<aclass="headerlink" href="#id19" title="Link to this heading">¶</a></h2>
387
422
<p>This is the first release of <codeclass="docutils literal notranslate"><spanclass="pre">array_api_strict</span></code>. It is extracted from
388
423
<codeclass="docutils literal notranslate"><spanclass="pre">numpy.array_api</span></code>, which was included as an experimental submodule in NumPy
389
424
versions prior to 2.0. Note that the commit history in this repository is
@@ -467,32 +502,41 @@ <h2>1.0 (2024-01-24)<a class="headerlink" href="#id16" title="Link to this headi
0 commit comments