Skip to content

Commit 506a372

Browse files
committed
Deploying to gh-pages from @ 2d56d32 🚀
1 parent df438b8 commit 506a372

File tree

11 files changed

+214
-81
lines changed

11 files changed

+214
-81
lines changed

_sources/changelog.md.txt

Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,73 @@
11
# Changelog
22

3+
## 2.3 (2025-XX-XX)
4+
5+
### Major Changes
6+
7+
- The default version of the array API standard is now 2024.12. Previous versions can
8+
still be enabled via the [flags API](array-api-strict-flags).
9+
10+
Note that this support is still relatively untested. Please [report any
11+
issues](https://github.com/data-apis/array-api-strict/issues) you find.
12+
13+
- Binary elementwise functions now accept python scalars: the only requirement is that
14+
at least one of the arguments must be an array; the other argument may be either
15+
a python scalar or an array. Python scalars are handled in accordance with the
16+
type promotion rules, as specified by the standard.
17+
This change unifies the behavior of binary functions and their matching operators,
18+
(where available), such as `multiply(x1, x2)` and `__mul__(self, other)`.
19+
20+
`where` accepts arrays or scalars as its 2nd and 3rd arguments, `x1` and `x2`.
21+
The first argument, `condition`, must be an array.
22+
23+
`result_type` accepts arrays and scalars and computes the result dtype according
24+
to the promotion rules.
25+
26+
- Ergonomics of working with complex values has been improved:
27+
28+
- binary operators accept complex scalars and real arrays and preserve the floating point
29+
precision: `1j*f32_array` returns a `complex64` array
30+
- `mean` accepts complex floating-point arrays.
31+
- `real` and `conj` accept numeric arguments, including real floating point data.
32+
Note that `imag` still requires its input to be a complex array.
33+
34+
- The following functions, new in the 2024.12 standard revision, are implemented:
35+
36+
- `count_nonzero`
37+
- `cumulative_prod`
38+
39+
- `fftfreq` and `rfftfreq` functions accept a new `dtype` argument to control the
40+
the data type of their output.
41+
42+
43+
### Minor Changes
44+
45+
- `vecdot` now conjugates the first argument, in accordance with the standard.
46+
47+
- `astype` now raises a `TypeError` instead of casting a complex floating-point
48+
array to a real-valued or an integral data type.
49+
50+
- `where` requires that its first argument, `condition` has a boolean data dtype,
51+
and raises a `TypeError` otherwise.
52+
53+
- `isdtype` raises a `TypeError` is its argument is not a dtype object.
54+
55+
- arrays created with `from_dlpack` now correctly set their `device` attribute.
56+
57+
- the build system now uses `pyproject.toml`, not `setup.py`.
58+
59+
### Contributors
60+
61+
The following users contributed to this release:
62+
63+
Aaron Meurer
64+
Clément Robert
65+
Guido Imperiale
66+
Evgeni Burovski
67+
Lucas Colley
68+
Tim Head
69+
70+
371
## 2.2 (2024-11-11)
472

573
### Major Changes

_static/basic.css

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -741,14 +741,6 @@ abbr, acronym {
741741
cursor: help;
742742
}
743743

744-
.translated {
745-
background-color: rgba(207, 255, 207, 0.2)
746-
}
747-
748-
.untranslated {
749-
background-color: rgba(255, 207, 207, 0.2)
750-
}
751-
752744
/* -- code displays --------------------------------------------------------- */
753745

754746
pre {

_static/searchtools.js

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -513,9 +513,11 @@ const Search = {
513513
// perform the search on the required terms
514514
searchTerms.forEach((word) => {
515515
const files = [];
516+
// find documents, if any, containing the query word in their text/title term indices
517+
// use Object.hasOwnProperty to avoid mismatching against prototype properties
516518
const arr = [
517-
{ files: terms[word], score: Scorer.term },
518-
{ files: titleTerms[word], score: Scorer.title },
519+
{ files: terms.hasOwnProperty(word) ? terms[word] : undefined, score: Scorer.term },
520+
{ files: titleTerms.hasOwnProperty(word) ? titleTerms[word] : undefined, score: Scorer.title },
519521
];
520522
// add support for partial matches
521523
if (word.length > 2) {
@@ -547,8 +549,9 @@ const Search = {
547549

548550
// set score for the word in each file
549551
recordFiles.forEach((file) => {
550-
if (!scoreMap.has(file)) scoreMap.set(file, {});
551-
scoreMap.get(file)[word] = record.score;
552+
if (!scoreMap.has(file)) scoreMap.set(file, new Map());
553+
const fileScores = scoreMap.get(file);
554+
fileScores.set(word, record.score);
552555
});
553556
});
554557

@@ -587,7 +590,7 @@ const Search = {
587590
break;
588591

589592
// select one (max) score for the file.
590-
const score = Math.max(...wordList.map((w) => scoreMap.get(file)[w]));
593+
const score = Math.max(...wordList.map((w) => scoreMap.get(file).get(w)));
591594
// add result to the result list
592595
results.push([
593596
docNames[file],

api.html

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<meta name="color-scheme" content="light dark"><meta name="viewport" content="width=device-width, initial-scale=1" />
66
<link rel="index" title="Index" href="genindex.html" /><link rel="search" title="Search" href="search.html" /><link rel="next" title="Changelog" href="changelog.html" /><link rel="prev" title="array-api-strict" href="index.html" />
77

8-
<link rel="shortcut icon" href="_static/favicon.png"/><!-- Generated with Sphinx 8.1.3 and Furo 2024.08.06 -->
8+
<link rel="shortcut icon" href="_static/favicon.png"/><!-- Generated with Sphinx 8.2.1 and Furo 2024.08.06 -->
99
<title>API Reference - array-api-strict documentation</title>
1010
<link rel="stylesheet" type="text/css" href="_static/pygments.css?v=a746c00c" />
1111
<link rel="stylesheet" type="text/css" href="_static/styles/furo.css?v=354aac6f" />
@@ -317,7 +317,7 @@
317317

318318
<dl class="py function">
319319
<dt class="sig sig-object py" id="array_api_strict.set_array_api_strict_flags">
320-
<span class="sig-prename descclassname"><span class="pre">array_api_strict.</span></span><span class="sig-name descname"><span class="pre">set_array_api_strict_flags</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="o"><span class="pre">*</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">api_version</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">boolean_indexing</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">data_dependent_shapes</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">enabled_extensions</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#array_api_strict.set_array_api_strict_flags" title="Link to this definition"></a></dt>
320+
<span class="sig-prename descclassname"><span class="pre">array_api_strict.</span></span><span class="sig-name descname"><span class="pre">set_array_api_strict_flags</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="keyword-only-separator o"><abbr title="Keyword-only parameters separator (PEP 3102)"><span class="pre">*</span></abbr></span></em>, <em class="sig-param"><span class="n"><span class="pre">api_version</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">boolean_indexing</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">data_dependent_shapes</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">enabled_extensions</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#array_api_strict.set_array_api_strict_flags" title="Link to this definition"></a></dt>
321321
<dd><p>Set the array-api-strict flags to the specified values.</p>
322322
<p>Flags are global variables that enable or disable array-api-strict
323323
behaviors.</p>
@@ -331,8 +331,8 @@
331331
<dt class="field-odd">Parameters<span class="colon">:</span></dt>
332332
<dd class="field-odd"><ul>
333333
<li><p><strong>api_version</strong> (<em>str, optional</em>) – The version of the standard to use. Supported versions are:
334-
<code class="docutils literal notranslate"><span class="pre">('2021.12',</span> <span class="pre">'2022.12',</span> <span class="pre">'2023.12')</span></code>, plus the draft version <code class="docutils literal notranslate"><span class="pre">2024.12</span></code>.
335-
The default version number is <code class="docutils literal notranslate"><span class="pre">'2023.12'</span></code>.</p>
334+
<code class="docutils literal notranslate"><span class="pre">('2021.12',</span> <span class="pre">'2022.12',</span> <span class="pre">'2023.12',</span> <span class="pre">'2024.12')</span></code>, plus the draft version <code class="docutils literal notranslate"><span class="pre">2025.12</span></code>.
335+
The default version number is <code class="docutils literal notranslate"><span class="pre">'2024.12'</span></code>.</p>
336336
<p>Note that 2021.12 is supported, but currently gives the same thing as
337337
2022.12 (except that the fft extension will be disabled).</p>
338338
</li>
@@ -426,7 +426,7 @@
426426

427427
<dl class="py class">
428428
<dt class="sig sig-object py" id="array_api_strict.ArrayAPIStrictFlags">
429-
<em class="property"><span class="pre">class</span><span class="w"> </span></em><span class="sig-prename descclassname"><span class="pre">array_api_strict.</span></span><span class="sig-name descname"><span class="pre">ArrayAPIStrictFlags</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="o"><span class="pre">*</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">api_version</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">boolean_indexing</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">data_dependent_shapes</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">enabled_extensions</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#array_api_strict.ArrayAPIStrictFlags" title="Link to this definition"></a></dt>
429+
<em class="property"><span class="k"><span class="pre">class</span></span><span class="w"> </span></em><span class="sig-prename descclassname"><span class="pre">array_api_strict.</span></span><span class="sig-name descname"><span class="pre">ArrayAPIStrictFlags</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="keyword-only-separator o"><abbr title="Keyword-only parameters separator (PEP 3102)"><span class="pre">*</span></abbr></span></em>, <em class="sig-param"><span class="n"><span class="pre">api_version</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">boolean_indexing</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">data_dependent_shapes</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">enabled_extensions</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#array_api_strict.ArrayAPIStrictFlags" title="Link to this definition"></a></dt>
430430
<dd><p>A context manager to temporarily set the array-api-strict flags.</p>
431431
<div class="admonition note">
432432
<p class="admonition-title">Note</p>

0 commit comments

Comments
 (0)