From aeb2c66c6ad508c15fc94024f12e1e2a244a4a10 Mon Sep 17 00:00:00 2001 From: asmeurer Date: Fri, 19 Apr 2024 19:22:30 +0000 Subject: [PATCH] =?UTF-8?q?Deploying=20to=20gh-pages=20from=20@=20data-api?= =?UTF-8?q?s/array-api-strict@7aaeda2cccd5b7573269f449a910708216e05b20=20?= =?UTF-8?q?=F0=9F=9A=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .buildinfo | 2 +- _sources/api.rst.txt | 48 ++++ _sources/changelog.md.txt | 2 +- _sources/index.md.txt | 2 + _static/basic.css | 2 +- _static/doctools.js | 2 +- _static/language_data.js | 4 +- _static/searchtools.js | 165 ++++++++----- api.html | 507 ++++++++++++++++++++++++++++++++++++++ changelog.html | 21 +- genindex.html | 99 +++++++- index.html | 21 +- objects.inv | Bin 263 -> 493 bytes py-modindex.html | 265 ++++++++++++++++++++ search.html | 5 +- searchindex.js | 2 +- 16 files changed, 1055 insertions(+), 92 deletions(-) create mode 100644 _sources/api.rst.txt create mode 100644 api.html create mode 100644 py-modindex.html diff --git a/.buildinfo b/.buildinfo index 8b22cc8..16fac98 100644 --- a/.buildinfo +++ b/.buildinfo @@ -1,4 +1,4 @@ # Sphinx build info version 1 # This file hashes the configuration used when building these files. When it is not found, a full rebuild will be done. -config: 2cd708610d0c928b41fdaf042e47556e +config: c1dbd23912ba4c237949b82bca10c0ea tags: 645f666f9bcd5a90fca523b33c5a78b7 diff --git a/_sources/api.rst.txt b/_sources/api.rst.txt new file mode 100644 index 0000000..e703a63 --- /dev/null +++ b/_sources/api.rst.txt @@ -0,0 +1,48 @@ +API Reference +============= + +.. automodule:: array_api_strict + +Array API Strict Flags +---------------------- + +.. automodule:: array_api_strict._flags + +.. currentmodule:: array_api_strict + +.. autofunction:: get_array_api_strict_flags +.. autofunction:: set_array_api_strict_flags +.. autofunction:: reset_array_api_strict_flags +.. autoclass:: ArrayAPIStrictFlags + +.. _environment-variables: + +Environment Variables +~~~~~~~~~~~~~~~~~~~~~ + +Flags can also be set with environment variables. +:func:`set_array_api_strict_flags` will override the values set by environment +variables. Note that the environment variables will only change the defaults +used by array-api-strict initially. They will not change the defaults used by +:func:`reset_array_api_strict_flags`. + +.. envvar:: ARRAY_API_STRICT_API_VERSION + + A string representing the version number. + +.. envvar:: ARRAY_API_STRICT_DATA_DEPENDENT_SHAPES + + "True" or "False" to enable or disable data dependent shapes. + +.. envvar:: ARRAY_API_STRICT_ENABLED_EXTENSIONS + + A comma separated list of extensions to enable. + +Array API Functions +-------------------- + +All functions and methods in +the array API standard are implemented in array-api-strict. See the `Array API +Standard +`__ for +full documentation for each function. diff --git a/_sources/changelog.md.txt b/_sources/changelog.md.txt index 8f1c203..04c383d 100644 --- a/_sources/changelog.md.txt +++ b/_sources/changelog.md.txt @@ -20,7 +20,7 @@ This is the first release of `array_api_strict`. It is extracted from `numpy.array_api`, which was included as an experimental submodule in NumPy versions prior to 2.0. Note that the commit history in this repository is -extracted from the git history of numpy/array_api/ (see the [README](README.md)). +extracted from the git history of numpy/array_api/ (see [](numpy.array_api)). Additionally, the following changes are new to `array_api_strict` from `numpy.array_api` in NumPy 1.26 (the last NumPy feature release to include diff --git a/_sources/index.md.txt b/_sources/index.md.txt index 307a9c2..6e84efa 100644 --- a/_sources/index.md.txt +++ b/_sources/index.md.txt @@ -183,6 +183,7 @@ issue, but this hasn't necessarily been tested thoroughly. API standard. [Support for 2023.12 is planned](https://github.com/data-apis/array-api-strict/issues/25). +(numpy.array_api)= ## Relationship to `numpy.array_api` Previously this implementation was available as `numpy.array_api`, but it was @@ -201,5 +202,6 @@ git_filter_repo.py --path numpy/array_api/ --path-rename numpy/array_api:array_a :titlesonly: :hidden: +api.rst changelog.md ``` diff --git a/_static/basic.css b/_static/basic.css index 30fee9d..f316efc 100644 --- a/_static/basic.css +++ b/_static/basic.css @@ -4,7 +4,7 @@ * * Sphinx stylesheet -- basic theme. * - * :copyright: Copyright 2007-2023 by the Sphinx team, see AUTHORS. + * :copyright: Copyright 2007-2024 by the Sphinx team, see AUTHORS. * :license: BSD, see LICENSE for details. * */ diff --git a/_static/doctools.js b/_static/doctools.js index d06a71d..4d67807 100644 --- a/_static/doctools.js +++ b/_static/doctools.js @@ -4,7 +4,7 @@ * * Base JavaScript utilities for all Sphinx HTML documentation. * - * :copyright: Copyright 2007-2023 by the Sphinx team, see AUTHORS. + * :copyright: Copyright 2007-2024 by the Sphinx team, see AUTHORS. * :license: BSD, see LICENSE for details. * */ diff --git a/_static/language_data.js b/_static/language_data.js index 250f566..367b8ed 100644 --- a/_static/language_data.js +++ b/_static/language_data.js @@ -5,7 +5,7 @@ * This script contains the language-specific data used by searchtools.js, * namely the list of stopwords, stemmer, scorer and splitter. * - * :copyright: Copyright 2007-2023 by the Sphinx team, see AUTHORS. + * :copyright: Copyright 2007-2024 by the Sphinx team, see AUTHORS. * :license: BSD, see LICENSE for details. * */ @@ -13,7 +13,7 @@ var stopwords = ["a", "and", "are", "as", "at", "be", "but", "by", "for", "if", "in", "into", "is", "it", "near", "no", "not", "of", "on", "or", "such", "that", "the", "their", "then", "there", "these", "they", "this", "to", "was", "will", "with"]; -/* Non-minified version is copied as a separate JS file, is available */ +/* Non-minified version is copied as a separate JS file, if available */ /** * Porter Stemmer diff --git a/_static/searchtools.js b/_static/searchtools.js index 7918c3f..92da3f8 100644 --- a/_static/searchtools.js +++ b/_static/searchtools.js @@ -4,7 +4,7 @@ * * Sphinx JavaScript utilities for the full-text search. * - * :copyright: Copyright 2007-2023 by the Sphinx team, see AUTHORS. + * :copyright: Copyright 2007-2024 by the Sphinx team, see AUTHORS. * :license: BSD, see LICENSE for details. * */ @@ -99,7 +99,7 @@ const _displayItem = (item, searchTerms, highlightTerms) => { .then((data) => { if (data) listItem.appendChild( - Search.makeSearchSummary(data, searchTerms) + Search.makeSearchSummary(data, searchTerms, anchor) ); // highlight search terms in the summary if (SPHINX_HIGHLIGHT_ENABLED) // set in sphinx_highlight.js @@ -116,8 +116,8 @@ const _finishSearch = (resultCount) => { ); else Search.status.innerText = _( - `Search finished, found ${resultCount} page(s) matching the search query.` - ); + "Search finished, found ${resultCount} page(s) matching the search query." + ).replace('${resultCount}', resultCount); }; const _displayNextItem = ( results, @@ -137,6 +137,22 @@ const _displayNextItem = ( // search finished, update title and status message else _finishSearch(resultCount); }; +// Helper function used by query() to order search results. +// Each input is an array of [docname, title, anchor, descr, score, filename]. +// Order the results by score (in opposite order of appearance, since the +// `_displayNextItem` function uses pop() to retrieve items) and then alphabetically. +const _orderResultsByScoreThenName = (a, b) => { + const leftScore = a[4]; + const rightScore = b[4]; + if (leftScore === rightScore) { + // same score: sort alphabetically + const leftTitle = a[1].toLowerCase(); + const rightTitle = b[1].toLowerCase(); + if (leftTitle === rightTitle) return 0; + return leftTitle > rightTitle ? -1 : 1; // inverted is intentional + } + return leftScore > rightScore ? 1 : -1; +}; /** * Default splitQuery function. Can be overridden in ``sphinx.search`` with a @@ -160,13 +176,26 @@ const Search = { _queued_query: null, _pulse_status: -1, - htmlToText: (htmlString) => { + htmlToText: (htmlString, anchor) => { const htmlElement = new DOMParser().parseFromString(htmlString, 'text/html'); - htmlElement.querySelectorAll(".headerlink").forEach((el) => { el.remove() }); + for (const removalQuery of [".headerlinks", "script", "style"]) { + htmlElement.querySelectorAll(removalQuery).forEach((el) => { el.remove() }); + } + if (anchor) { + const anchorContent = htmlElement.querySelector(`[role="main"] ${anchor}`); + if (anchorContent) return anchorContent.textContent; + + console.warn( + `Anchored content block not found. Sphinx search tries to obtain it via DOM query '[role=main] ${anchor}'. Check your theme or template.` + ); + } + + // if anchor not specified or not found, fall back to main content const docContent = htmlElement.querySelector('[role="main"]'); - if (docContent !== undefined) return docContent.textContent; + if (docContent) return docContent.textContent; + console.warn( - "Content block not found. Sphinx search tries to obtain it via '[role=main]'. Could you check your theme or template." + "Content block not found. Sphinx search tries to obtain it via DOM query '[role=main]'. Check your theme or template." ); return ""; }, @@ -239,16 +268,7 @@ const Search = { else Search.deferQuery(query); }, - /** - * execute search (requires search index to be loaded) - */ - query: (query) => { - const filenames = Search._index.filenames; - const docNames = Search._index.docnames; - const titles = Search._index.titles; - const allTitles = Search._index.alltitles; - const indexEntries = Search._index.indexentries; - + _parseQuery: (query) => { // stem the search terms and add them to the correct list const stemmer = new Stemmer(); const searchTerms = new Set(); @@ -284,16 +304,32 @@ const Search = { // console.info("required: ", [...searchTerms]); // console.info("excluded: ", [...excludedTerms]); - // array of [docname, title, anchor, descr, score, filename] - let results = []; + return [query, searchTerms, excludedTerms, highlightTerms, objectTerms]; + }, + + /** + * execute search (requires search index to be loaded) + */ + _performSearch: (query, searchTerms, excludedTerms, highlightTerms, objectTerms) => { + const filenames = Search._index.filenames; + const docNames = Search._index.docnames; + const titles = Search._index.titles; + const allTitles = Search._index.alltitles; + const indexEntries = Search._index.indexentries; + + // Collect multiple result groups to be sorted separately and then ordered. + // Each is an array of [docname, title, anchor, descr, score, filename]. + const normalResults = []; + const nonMainIndexResults = []; + _removeChildren(document.getElementById("search-progress")); - const queryLower = query.toLowerCase(); + const queryLower = query.toLowerCase().trim(); for (const [title, foundTitles] of Object.entries(allTitles)) { - if (title.toLowerCase().includes(queryLower) && (queryLower.length >= title.length/2)) { + if (title.toLowerCase().trim().includes(queryLower) && (queryLower.length >= title.length/2)) { for (const [file, id] of foundTitles) { let score = Math.round(100 * queryLower.length / title.length) - results.push([ + normalResults.push([ docNames[file], titles[file] !== title ? `${titles[file]} > ${title}` : title, id !== null ? "#" + id : "", @@ -308,46 +344,47 @@ const Search = { // search for explicit entries in index directives for (const [entry, foundEntries] of Object.entries(indexEntries)) { if (entry.includes(queryLower) && (queryLower.length >= entry.length/2)) { - for (const [file, id] of foundEntries) { - let score = Math.round(100 * queryLower.length / entry.length) - results.push([ + for (const [file, id, isMain] of foundEntries) { + const score = Math.round(100 * queryLower.length / entry.length); + const result = [ docNames[file], titles[file], id ? "#" + id : "", null, score, filenames[file], - ]); + ]; + if (isMain) { + normalResults.push(result); + } else { + nonMainIndexResults.push(result); + } } } } // lookup as object objectTerms.forEach((term) => - results.push(...Search.performObjectSearch(term, objectTerms)) + normalResults.push(...Search.performObjectSearch(term, objectTerms)) ); // lookup as search terms in fulltext - results.push(...Search.performTermsSearch(searchTerms, excludedTerms)); + normalResults.push(...Search.performTermsSearch(searchTerms, excludedTerms)); // let the scorer override scores with a custom scoring function - if (Scorer.score) results.forEach((item) => (item[4] = Scorer.score(item))); - - // now sort the results by score (in opposite order of appearance, since the - // display function below uses pop() to retrieve items) and then - // alphabetically - results.sort((a, b) => { - const leftScore = a[4]; - const rightScore = b[4]; - if (leftScore === rightScore) { - // same score: sort alphabetically - const leftTitle = a[1].toLowerCase(); - const rightTitle = b[1].toLowerCase(); - if (leftTitle === rightTitle) return 0; - return leftTitle > rightTitle ? -1 : 1; // inverted is intentional - } - return leftScore > rightScore ? 1 : -1; - }); + if (Scorer.score) { + normalResults.forEach((item) => (item[4] = Scorer.score(item))); + nonMainIndexResults.forEach((item) => (item[4] = Scorer.score(item))); + } + + // Sort each group of results by score and then alphabetically by name. + normalResults.sort(_orderResultsByScoreThenName); + nonMainIndexResults.sort(_orderResultsByScoreThenName); + + // Combine the result groups in (reverse) order. + // Non-main index entries are typically arbitrary cross-references, + // so display them after other results. + let results = [...nonMainIndexResults, ...normalResults]; // remove duplicate search results // note the reversing of results, so that in the case of duplicates, the highest-scoring entry is kept @@ -361,7 +398,12 @@ const Search = { return acc; }, []); - results = results.reverse(); + return results.reverse(); + }, + + query: (query) => { + const [searchQuery, searchTerms, excludedTerms, highlightTerms, objectTerms] = Search._parseQuery(query); + const results = Search._performSearch(searchQuery, searchTerms, excludedTerms, highlightTerms, objectTerms); // for debugging //Search.lastresults = results.slice(); // a copy @@ -466,14 +508,18 @@ const Search = { // add support for partial matches if (word.length > 2) { const escapedWord = _escapeRegExp(word); - Object.keys(terms).forEach((term) => { - if (term.match(escapedWord) && !terms[word]) - arr.push({ files: terms[term], score: Scorer.partialTerm }); - }); - Object.keys(titleTerms).forEach((term) => { - if (term.match(escapedWord) && !titleTerms[word]) - arr.push({ files: titleTerms[word], score: Scorer.partialTitle }); - }); + if (!terms.hasOwnProperty(word)) { + Object.keys(terms).forEach((term) => { + if (term.match(escapedWord)) + arr.push({ files: terms[term], score: Scorer.partialTerm }); + }); + } + if (!titleTerms.hasOwnProperty(word)) { + Object.keys(titleTerms).forEach((term) => { + if (term.match(escapedWord)) + arr.push({ files: titleTerms[term], score: Scorer.partialTitle }); + }); + } } // no match but word was a required one @@ -496,9 +542,8 @@ const Search = { // create the mapping files.forEach((file) => { - if (fileMap.has(file) && fileMap.get(file).indexOf(word) === -1) - fileMap.get(file).push(word); - else fileMap.set(file, [word]); + if (!fileMap.has(file)) fileMap.set(file, [word]); + else if (fileMap.get(file).indexOf(word) === -1) fileMap.get(file).push(word); }); }); @@ -549,8 +594,8 @@ const Search = { * search summary for a given text. keywords is a list * of stemmed words. */ - makeSearchSummary: (htmlText, keywords) => { - const text = Search.htmlToText(htmlText); + makeSearchSummary: (htmlText, keywords, anchor) => { + const text = Search.htmlToText(htmlText, anchor); if (text === "") return null; const textLower = text.toLowerCase(); diff --git a/api.html b/api.html new file mode 100644 index 0000000..d80ce0f --- /dev/null +++ b/api.html @@ -0,0 +1,507 @@ + + + + + + + + + API Reference - array-api-strict documentation + + + + + + + + + + + + + + + + + + Contents + + + + + + Menu + + + + + + + + Expand + + + + + + Light mode + + + + + + + + + + + + + + Dark mode + + + + + + + Auto light/dark mode + + + + + + + + + + + + + + + + + + + +
+
+
+ +
+ +
+
+ +
+ +
+
+ +
+
+
+ + + + + Back to top + +
+ +
+ +
+ +
+
+
+

API Reference

+

array_api_strict is a strict, minimal implementation of the Python array +API (https://data-apis.org/array-api/latest/)

+

The purpose of array-api-strict is to provide an implementation of the array +API for consuming libraries to test against so they can be completely sure +their usage of the array API is portable.

+

It is not intended to be used by end-users. End-users of the array API +should just use their favorite array library (NumPy, CuPy, PyTorch, etc.) as +usual. It is also not intended to be used as a dependency by consuming +libraries. Consuming library code should use the +array-api-compat (https://data-apis.org/array-api-compat/) package to +support the array API. Rather, it is intended to be used in the test suites of +consuming libraries to test their array API usage.

+
+

Array API Strict Flags

+

These functions configure global flags that allow array-api-strict to be +used in different “modes”. These modes include

+
    +
  • Changing to different supported versions of the standard.

  • +
  • Enabling or disabling different optional behaviors (such as data-dependent +shapes).

  • +
  • Enabling or disabling different optional extensions.

  • +
+

None of these functions are part of the standard itself. A typical array API +library will only support one particular configuration of these flags.

+
+
+array_api_strict.get_array_api_strict_flags()
+

Get the current array-api-strict flags.

+
+

Note

+

This function is not part of the array API standard. It only exists +in array-api-strict.

+
+
+
Returns:
+

dict – A dictionary containing the current array-api-strict flags.

+
+
+

Examples

+
>>> from array_api_strict import get_array_api_strict_flags
+>>> flags = get_array_api_strict_flags()
+>>> flags
+{'api_version': '2022.12', 'data_dependent_shapes': True, 'enabled_extensions': ('linalg', 'fft')}
+
+
+
+

See also

+
+
set_array_api_strict_flags

Set one or more flags to a given value.

+
+
reset_array_api_strict_flags

Reset the flags to their default values.

+
+
ArrayAPIStrictFlags

A context manager to temporarily set the flags.

+
+
+
+
+ +
+
+array_api_strict.set_array_api_strict_flags(*, api_version=None, data_dependent_shapes=None, enabled_extensions=None)
+

Set the array-api-strict flags to the specified values.

+

Flags are global variables that enable or disable array-api-strict +behaviors.

+
+

Note

+

This function is not part of the array API standard. It only exists +in array-api-strict.

+
+
    +
  • api_version: The version of the standard to use. Supported +versions are: ('2021.12', '2022.12'). The default version number is +'2022.12'.

    +

    Note that 2021.12 is supported, but currently gives the same thing as +2022.12 (except that the fft extension will be disabled).

    +
  • +
  • data_dependent_shapes: Whether data-dependent shapes are enabled in +array-api-strict.

    +

    This flag is enabled by default. Array libraries that use computation +graphs may not be able to support functions whose output shapes depend +on the input data.

    +

    The functions that make use of data-dependent shapes, and are therefore +disabled by setting this flag to False are

    +
      +
    • unique_all, unique_counts, unique_inverse, and unique_values.

    • +
    • nonzero

    • +
    • Boolean array indexing

    • +
    • repeat when the repeats argument is an array (requires 2023.12 +version of the standard)

    • +
    +

    See +https://data-apis.org/array-api/latest/design_topics/data_dependent_output_shapes.html +for more details.

    +
  • +
  • enabled_extensions: A list of extensions that are enabled in +array-api-strict. The default is ('linalg', 'fft'). Note that +some extensions require a minimum version of the standard.

  • +
+

The flags can also be changed by setting environment variables.

+

Examples

+
>>> from array_api_strict import set_array_api_strict_flags
+
+
+
>>> # Set the standard version to 2021.12
+>>> set_array_api_strict_flags(api_version="2021.12")
+
+
+
>>> # Disable data-dependent shapes
+>>> set_array_api_strict_flags(data_dependent_shapes=False)
+
+
+
>>> # Enable only the linalg extension (disable the fft extension)
+>>> set_array_api_strict_flags(enabled_extensions=["linalg"])
+
+
+
+

See also

+
+
get_array_api_strict_flags

Get the current values of flags.

+
+
reset_array_api_strict_flags

Reset the flags to their default values.

+
+
ArrayAPIStrictFlags

A context manager to temporarily set the flags.

+
+
+
+
+ +
+
+array_api_strict.reset_array_api_strict_flags()
+

Reset the array-api-strict flags to their default values.

+

This will also reset any flags that were set by environment +variables back to their default values.

+
+

Note

+

This function is not part of the array API standard. It only exists +in array-api-strict.

+
+

See set_array_api_strict_flags() for a list of flags and their +default values.

+

Examples

+
>>> from array_api_strict import reset_array_api_strict_flags
+>>> reset_array_api_strict_flags()
+
+
+
+

See also

+
+
get_array_api_strict_flags

Get the current values of flags.

+
+
set_array_api_strict_flags

Set one or more flags to a given value.

+
+
ArrayAPIStrictFlags

A context manager to temporarily set the flags.

+
+
+
+
+ +
+
+class array_api_strict.ArrayAPIStrictFlags(*, api_version=None, data_dependent_shapes=None, enabled_extensions=None)
+

A context manager to temporarily set the array-api-strict flags.

+
+

Note

+

This class is not part of the array API standard. It only exists +in array-api-strict.

+
+

See set_array_api_strict_flags() for a +description of the available flags.

+
+

See also

+
+
get_array_api_strict_flags

Get the current values of flags.

+
+
set_array_api_strict_flags

Set one or more flags to a given value.

+
+
reset_array_api_strict_flags

Reset the flags to their default values.

+
+
+
+
+ +
+

Environment Variables

+

Flags can also be set with environment variables. +set_array_api_strict_flags() will override the values set by environment +variables. Note that the environment variables will only change the defaults +used by array-api-strict initially. They will not change the defaults used by +reset_array_api_strict_flags().

+
+
+ARRAY_API_STRICT_API_VERSION
+

A string representing the version number.

+
+ +
+
+ARRAY_API_STRICT_DATA_DEPENDENT_SHAPES
+

“True” or “False” to enable or disable data dependent shapes.

+
+ +
+
+ARRAY_API_STRICT_ENABLED_EXTENSIONS
+

A comma separated list of extensions to enable.

+
+ +
+
+
+

Array API Functions

+

All functions and methods in +the array API standard are implemented in array-api-strict. See the Array API +Standard for +full documentation for each function.

+
+
+ +
+
+ +
+ +
+
+ + + + + + + \ No newline at end of file diff --git a/changelog.html b/changelog.html index 855eacf..9d0391e 100644 --- a/changelog.html +++ b/changelog.html @@ -3,9 +3,9 @@ - + - + Changelog - array-api-strict documentation @@ -157,6 +157,7 @@ @@ -234,7 +327,7 @@

Index

- + diff --git a/index.html b/index.html index 53301d9..a358efe 100644 --- a/index.html +++ b/index.html @@ -3,9 +3,9 @@ - + - + array-api-strict documentation @@ -157,6 +157,7 @@ - + diff --git a/objects.inv b/objects.inv index 9e7859b9bcd718755dd5ad91782e44033d79014c..2588c33a593c4e173e7d4000421e76266494016d 100644 GIT binary patch delta 376 zcmV-;0f+vF0__8ket)e~O>cuB7{2o>NZKpScI}O|EHl}hQPXTELY1lsq5;~>e?OF2 zwJ~eg>;@0d#|!TZQ;Ic|)dkf?6^Vg$vo5RjC^&q87GCA16bpx-B}9N-2v)cSaNtGV z_F1q@wO>6Qe<-x5Ej(F+bpbcYY| z@zX2WQt}ZKzpdp46N`1Ev`WSehSnB_{J<5L2?t5eWX466jk#ygDK`BUSo=a%vgFbr zn^Um8;JQ-^wsGfTGDu5E1~%OFY>;tT$drFgWj*Q=y>|nc4-@YV{X#$0A z(*N&C=pa~@Xmu`hrHI;GH1=?CWfpzwtFjz?AbxMKz>{Ugd)nyxI;tx|= zH@PH_Ma_|ZoL#EvMf1i;FX8>cq5Y#xwYV70c4kQE&SJ}&^9pGF1eVnYN5yAc&QD0W diff --git a/py-modindex.html b/py-modindex.html new file mode 100644 index 0000000..ee2f7a8 --- /dev/null +++ b/py-modindex.html @@ -0,0 +1,265 @@ + + + + + + + Python Module Index - array-api-strict documentation + + + + + + + + + + + + + + + + + + Contents + + + + + + Menu + + + + + + + + Expand + + + + + + Light mode + + + + + + + + + + + + + + Dark mode + + + + + + + Auto light/dark mode + + + + + + + + + + + + + + + + + + + +
+
+
+ +
+ +
+
+ +
+ +
+
+ +
+
+
+ + + + + Back to top + +
+
+ +
+ +
+ +
+
+ + +
+
+ + Made with Sphinx and @pradyunsg's + + Furo + +
+
+
+ + + + + + +
+
+
+ +
+
+ +
+
+ + + + + + + \ No newline at end of file diff --git a/search.html b/search.html index 61e0902..2f4c116 100644 --- a/search.html +++ b/search.html @@ -4,7 +4,7 @@ - Search - array-api-strict documentation + Search - array-api-strict documentation @@ -154,6 +154,7 @@ - + diff --git a/searchindex.js b/searchindex.js index c58756a..72c45b0 100644 --- a/searchindex.js +++ b/searchindex.js @@ -1 +1 @@ -Search.setIndex({"docnames": ["changelog", "index"], "filenames": ["changelog.md", "index.md"], "titles": ["Changelog", "array-api-strict"], "terms": {"fix": 0, "api_vers": 0, "argument": [0, 1], "__array_namespace__": 0, "accept": [0, 1], "2021": 0, "12": [0, 1], "2022": [0, 1], "copi": 0, "flag": 0, "__array__": 0, "numpi": 0, "2": [0, 1], "add": [0, 1], "full": [0, 1], "fals": 0, "support": [0, 1], "asarrai": [0, 1], "thi": [0, 1], "i": [0, 1], "emul": 0, "26": [0, 1], "creat": [0, 1], "arrai": 0, "see": [0, 1], "For": [0, 1], "new": 0, "nativ": 0, "us": [0, 1], "broadcast": 0, "cross": 0, "first": 0, "releas": 0, "array_api_strict": [0, 1], "It": [0, 1], "extract": 0, "from": [0, 1], "array_api": 0, "which": [0, 1], "wa": [0, 1], "includ": [0, 1], "an": [0, 1], "experiment": 0, "submodul": 0, "version": [0, 1], "prior": [0, 1], "note": [0, 1], "commit": [0, 1], "histori": [0, 1], "repositori": 0, "git": [0, 1], "readm": 0, "addition": 0, "follow": [0, 1], "chang": 0, "ar": [0, 1], "last": [0, 1], "featur": 0, "made": 0, "more": [0, 1], "portabl": [0, 1], "In": [0, 1], "particular": 0, "longer": 0, "cpu": [0, 1], "its": 0, "devic": [0, 1], "rather": [0, 1], "separ": [0, 1], "cpu_devic": [0, 1], "object": [0, 1], "access": [0, 1], "namespac": 0, "becaus": 0, "part": 0, "api": 0, "standard": [0, 1], "now": 0, "wrap": [0, 1], "dtype": [0, 1], "previous": [0, 1], "reus": 0, "make": 0, "clear": 0, "behavior": [0, 1], "effect": 0, "onli": [0, 1], "requir": [0, 1], "nonzero": [0, 1], "error": [0, 1], "zero": 0, "dimension": 0, "option": 0, "fft": 0, "extens": [0, 1], "ad": 0, "minim": 1, "implement": 1, "python": 1, "The": 1, "purpos": 1, "provid": 1, "consum": 1, "librari": 1, "test": 1, "against": 1, "so": 1, "thei": 1, "can": 1, "complet": 1, "sure": 1, "usag": 1, "intend": 1, "end": 1, "user": 1, "should": 1, "just": 1, "favorit": 1, "cupi": 1, "pytorch": 1, "etc": 1, "usual": 1, "also": 1, "depend": 1, "code": 1, "compat": 1, "packag": 1, "suit": 1, "current": 1, "2023": 1, "plan": 1, "track": 1, "issu": 1, "avail": 1, "both": 1, "pypi": 1, "m": 1, "pip": 1, "conda": 1, "forg": 1, "channel": 1, "1": 1, "upcom": 1, "0": 1, "ha": 1, "mani": 1, "function": 1, "conform": 1, "doe": 1, "most": 1, "case": 1, "disallow": 1, "addit": 1, "keyword": 1, "aren": 1, "t": 1, "explicitli": 1, "howev": 1, "pose": 1, "problem": 1, "mai": 1, "accident": 1, "reli": 1, "happen": 1, "everi": 1, "e": 1, "g": 1, "isn": 1, "other": 1, "solv": 1, "those": 1, "exampl": 1, "scalar": 1, "input": 1, "import": 1, "np": 1, "sin": 1, "specifi": 1, "And": 1, "inde": 1, "some": 1, "do": 1, "allow": 1, "torch": 1, "traceback": 1, "recent": 1, "call": 1, "file": 1, "stdin": 1, "line": 1, "modul": 1, "typeerror": 1, "posit": 1, "must": 1, "tensor": 1, "float": 1, "xp": 1, "attributeerror": 1, "attribut": 1, "here": 1, "incomplet": 1, "list": 1, "sort": 1, "wai": 1, "method": 1, "defin": 1, "all": 1, "signatur": 1, "As": 1, "abov": 1, "except": 1, "place": 1, "where": 1, "automat": 1, "reject": 1, "": 1, "one": 1, "restrict": 1, "aspect": 1, "transcendent": 1, "like": 1, "integ": 1, "them": 1, "point": 1, "integer_arrai": 1, "rais": 1, "index": 1, "semant": 1, "limit": 1, "compar": 1, "out": 1, "bound": 1, "slice": 1, "singl": 1, "boolean": 1, "There": 1, "distinct": 1, "d": 1, "empti": 1, "equal": 1, "comparison": 1, "name": 1, "float32": 1, "type": 1, "itself": 1, "privat": 1, "subclass": 1, "otherwis": 1, "try": 1, "directli": 1, "initi": 1, "creation": 1, "thin": 1, "pure": 1, "wrapper": 1, "around": 1, "fulli": 1, "although": 1, "base": 1, "mix": 1, "gener": 1, "indic": 1, "potenti": 1, "hasn": 1, "necessarili": 1, "been": 1, "thoroughli": 1, "valid": 1, "few": 1, "minor": 1, "instanc": 1, "deviat": 1, "inconveni": 1, "workaround": 1, "sinc": 1, "aim": 1, "remain": 1, "you": 1, "known": 1, "fail": 1, "xfail": 1, "ndarrai": 1, "perform": 1, "mostli": 1, "nonetheless": 1, "primari": 1, "concern": 1, "superfici": 1, "x": 1, "alwai": 1, "either": 1, "none": 1, "A": 1, "futur": 1, "backend": 1, "signific": 1, "expect": 1, "check": 1, "suffici": 1, "duck": 1, "pass": 1, "through": 1, "silent": 1, "best": 1, "get": 1, "instead": 1, "have": 1, "annot": 1, "improv": 1, "cannot": 1, "data": 1, "shape": 1, "unique_": 1, "disabl": 1, "move": 1, "repo": 1, "fbefd42e4d11e9be20e0a4785f2619fc1aef1e7c": 1, "filter": 1, "command": 1, "git_filter_repo": 1, "py": 1, "path": 1, "renam": 1, "replac": 1, "text": 1, "echo": 1, "nfrom": 1, "core": 1, "_core": 1, "linalg": 1, "callback": 1, "messag": 1, "rstrip": 1, "b": 1, "n": 1, "norigin": 1, "original_id": 1}, "objects": {}, "objtypes": {}, "objnames": {}, "titleterms": {"changelog": 0, "1": 0, "2024": 0, "04": 0, "29": 0, "08": 0, "0": 0, "01": 0, "24": 0, "arrai": 1, "api": 1, "strict": 1, "instal": 1, "rational": 1, "caveat": 1, "relationship": 1, "numpi": 1, "array_api": 1}, "envversion": {"sphinx.domains.c": 3, "sphinx.domains.changeset": 1, "sphinx.domains.citation": 1, "sphinx.domains.cpp": 9, "sphinx.domains.index": 1, "sphinx.domains.javascript": 3, "sphinx.domains.math": 2, "sphinx.domains.python": 4, "sphinx.domains.rst": 2, "sphinx.domains.std": 2, "sphinx": 60}, "alltitles": {"Changelog": [[0, "changelog"]], "1.1.1 (2024-04-29)": [[0, "id1"]], "1.1 (2024-04-08)": [[0, "id2"]], "1.0 (2024-01-24)": [[0, "id3"]], "array-api-strict": [[1, "array-api-strict"]], "Install": [[1, "install"]], "Rationale": [[1, "rationale"]], "Caveats": [[1, "caveats"]], "Relationship to numpy.array_api": [[1, "relationship-to-numpy-array-api"]]}, "indexentries": {}}) \ No newline at end of file +Search.setIndex({"alltitles": {"1.0 (2024-01-24)": [[1, "id3"]], "1.1 (2024-04-08)": [[1, "id2"]], "1.1.1 (2024-04-29)": [[1, "id1"]], "API Reference": [[0, "module-array_api_strict"]], "Array API Functions": [[0, "array-api-functions"]], "Array API Strict Flags": [[0, "module-array_api_strict._flags"]], "Caveats": [[2, "caveats"]], "Changelog": [[1, "changelog"]], "Environment Variables": [[0, "environment-variables"]], "Install": [[2, "install"]], "Rationale": [[2, "rationale"]], "Relationship to numpy.array_api": [[2, "relationship-to-numpy-array-api"]], "array-api-strict": [[2, "array-api-strict"]]}, "docnames": ["api", "changelog", "index"], "envversion": {"sphinx": 61, "sphinx.domains.c": 3, "sphinx.domains.changeset": 1, "sphinx.domains.citation": 1, "sphinx.domains.cpp": 9, "sphinx.domains.index": 1, "sphinx.domains.javascript": 3, "sphinx.domains.math": 2, "sphinx.domains.python": 4, "sphinx.domains.rst": 2, "sphinx.domains.std": 2}, "filenames": ["api.rst", "changelog.md", "index.md"], "indexentries": {"array_api_strict": [[0, "module-array_api_strict", false]], "array_api_strict._flags": [[0, "module-array_api_strict._flags", false]], "array_api_strict_api_version": [[0, "envvar-ARRAY_API_STRICT_API_VERSION", false]], "array_api_strict_data_dependent_shapes": [[0, "envvar-ARRAY_API_STRICT_DATA_DEPENDENT_SHAPES", false]], "array_api_strict_enabled_extensions": [[0, "envvar-ARRAY_API_STRICT_ENABLED_EXTENSIONS", false]], "arrayapistrictflags (class in array_api_strict)": [[0, "array_api_strict.ArrayAPIStrictFlags", false]], "environment variable": [[0, "envvar-ARRAY_API_STRICT_API_VERSION", false], [0, "envvar-ARRAY_API_STRICT_DATA_DEPENDENT_SHAPES", false], [0, "envvar-ARRAY_API_STRICT_ENABLED_EXTENSIONS", false]], "get_array_api_strict_flags() (in module array_api_strict)": [[0, "array_api_strict.get_array_api_strict_flags", false]], "module": [[0, "module-array_api_strict", false], [0, "module-array_api_strict._flags", false]], "reset_array_api_strict_flags() (in module array_api_strict)": [[0, "array_api_strict.reset_array_api_strict_flags", false]], "set_array_api_strict_flags() (in module array_api_strict)": [[0, "array_api_strict.set_array_api_strict_flags", false]]}, "objects": {"": [[0, 0, 0, "-", "array_api_strict"], [0, 3, 1, "-", "ARRAY_API_STRICT_API_VERSION"], [0, 3, 1, "-", "ARRAY_API_STRICT_DATA_DEPENDENT_SHAPES"], [0, 3, 1, "-", "ARRAY_API_STRICT_ENABLED_EXTENSIONS"]], "array_api_strict": [[0, 1, 1, "", "ArrayAPIStrictFlags"], [0, 0, 0, "-", "_flags"], [0, 2, 1, "", "get_array_api_strict_flags"], [0, 2, 1, "", "reset_array_api_strict_flags"], [0, 2, 1, "", "set_array_api_strict_flags"]]}, "objnames": {"0": ["py", "module", "Python module"], "1": ["py", "class", "Python class"], "2": ["py", "function", "Python function"], "3": ["std", "envvar", "environment variable"]}, "objtypes": {"0": "py:module", "1": "py:class", "2": "py:function", "3": "std:envvar"}, "terms": {"": 2, "0": 2, "1": 2, "12": [0, 1, 2], "2": [1, 2], "2021": [0, 1], "2022": [0, 1, 2], "2023": [0, 2], "26": [1, 2], "A": [0, 2], "And": 2, "As": 2, "For": [1, 2], "In": [1, 2], "It": [0, 1, 2], "The": [0, 2], "There": 2, "These": 0, "__array__": 1, "__array_namespace__": 1, "_core": 2, "abl": 0, "abov": 2, "accept": [1, 2], "access": [1, 2], "accident": 2, "ad": 1, "add": [1, 2], "addit": 2, "addition": 1, "against": [0, 2], "aim": 2, "all": [0, 2], "allow": [0, 2], "also": [0, 2], "although": 2, "alwai": 2, "an": [0, 1, 2], "ani": 0, "annot": 2, "api": 1, "api_vers": [0, 1], "ar": [0, 1, 2], "aren": 2, "argument": [0, 1, 2], "around": 2, "arrai": 1, "array_api": 1, "array_api_strict": [0, 1, 2], "array_api_strict_api_vers": 0, "array_api_strict_data_dependent_shap": 0, "array_api_strict_enabled_extens": 0, "arrayapistrictflag": 0, "asarrai": [1, 2], "aspect": 2, "attribut": 2, "attributeerror": 2, "automat": 2, "avail": [0, 2], "b": 2, "back": 0, "backend": 2, "base": 2, "becaus": 1, "been": 2, "behavior": [0, 1, 2], "best": 2, "boolean": [0, 2], "both": 2, "bound": 2, "broadcast": 1, "call": 2, "callback": 2, "can": [0, 2], "cannot": 2, "case": 2, "chang": [0, 1], "channel": 2, "check": 2, "class": 0, "clear": 1, "code": [0, 2], "comma": 0, "command": 2, "commit": [1, 2], "compar": 2, "comparison": 2, "compat": [0, 2], "complet": [0, 2], "comput": 0, "concern": 2, "conda": 2, "configur": 0, "conform": 2, "consum": [0, 2], "contain": 0, "context": 0, "copi": 1, "core": 2, "cpu": [1, 2], "cpu_devic": [1, 2], "creat": [1, 2], "creation": 2, "cross": 1, "cupi": [0, 2], "current": [0, 2], "d": 2, "data": [0, 2], "data_dependent_output_shap": 0, "data_dependent_shap": 0, "default": 0, "defin": 2, "depend": [0, 2], "descript": 0, "design_top": 0, "detail": 0, "deviat": 2, "devic": [1, 2], "dict": 0, "dictionari": 0, "differ": 0, "dimension": 1, "directli": 2, "disabl": [0, 2], "disallow": 2, "distinct": 2, "do": 2, "document": 0, "doe": 2, "dtype": [1, 2], "duck": 2, "e": 2, "each": 0, "echo": 2, "effect": 1, "either": 2, "empti": 2, "emul": 1, "enabl": 0, "enabled_extens": 0, "end": [0, 2], "equal": 2, "error": [1, 2], "etc": [0, 2], "everi": 2, "exampl": [0, 2], "except": [0, 2], "exist": 0, "expect": 2, "experiment": 1, "explicitli": 2, "extens": [0, 1, 2], "extract": 1, "fail": 2, "fals": [0, 1], "favorit": [0, 2], "fbefd42e4d11e9be20e0a4785f2619fc1aef1e7c": 2, "featur": 1, "few": 2, "fft": [0, 1], "file": 2, "filter": 2, "first": 1, "fix": 1, "flag": 1, "float": 2, "float32": 2, "follow": [1, 2], "forg": 2, "from": [0, 1, 2], "full": [0, 1, 2], "fulli": 2, "function": 2, "futur": 2, "g": 2, "gener": 2, "get": [0, 2], "get_array_api_strict_flag": 0, "git": [1, 2], "git_filter_repo": 2, "give": 0, "given": 0, "global": 0, "graph": 0, "ha": 2, "happen": 2, "hasn": 2, "have": 2, "here": 2, "histori": [1, 2], "howev": 2, "html": 0, "http": 0, "i": [0, 1, 2], "implement": [0, 2], "import": [0, 2], "improv": 2, "includ": [0, 1, 2], "incomplet": 2, "inconveni": 2, "inde": 2, "index": [0, 2], "indic": 2, "initi": [0, 2], "input": [0, 2], "instanc": 2, "instead": 2, "integ": 2, "integer_arrai": 2, "intend": [0, 2], "isn": 2, "issu": 2, "its": 1, "itself": [0, 2], "just": [0, 2], "keyword": 2, "known": 2, "last": [1, 2], "latest": 0, "librari": [0, 2], "like": 2, "limit": 2, "linalg": [0, 2], "line": 2, "list": [0, 2], "longer": 1, "m": 2, "made": 1, "mai": [0, 2], "make": [0, 1], "manag": 0, "mani": 2, "messag": 2, "method": [0, 2], "minim": [0, 2], "minimum": 0, "minor": 2, "mix": 2, "mode": 0, "modul": 2, "more": [0, 1, 2], "most": 2, "mostli": 2, "move": 2, "must": 2, "n": 2, "name": 2, "namespac": 1, "nativ": 1, "ndarrai": 2, "necessarili": 2, "new": 1, "nfrom": 2, "none": [0, 2], "nonetheless": 2, "nonzero": [0, 1, 2], "norigin": 2, "note": [0, 1, 2], "now": 1, "np": 2, "number": 0, "numpi": [0, 1], "object": [1, 2], "one": [0, 2], "onli": [0, 1, 2], "option": [0, 1], "org": 0, "original_id": 2, "other": 2, "otherwis": 2, "out": 2, "output": 0, "overrid": 0, "packag": [0, 2], "part": [0, 1], "particular": [0, 1], "pass": 2, "path": 2, "perform": 2, "pip": 2, "place": 2, "plan": 2, "point": 2, "portabl": [0, 1, 2], "pose": 2, "posit": 2, "potenti": 2, "previous": [1, 2], "primari": 2, "prior": [1, 2], "privat": 2, "problem": 2, "provid": [0, 2], "pure": 2, "purpos": [0, 2], "py": 2, "pypi": 2, "python": [0, 2], "pytorch": [0, 2], "rais": 2, "rather": [0, 1, 2], "recent": 2, "reject": 2, "relationship": 1, "releas": 1, "reli": 2, "remain": 2, "renam": 2, "repeat": 0, "replac": 2, "repo": 2, "repositori": 1, "repres": 0, "requir": [0, 1, 2], "reset": 0, "reset_array_api_strict_flag": 0, "restrict": 2, "return": 0, "reus": 1, "rstrip": 2, "same": 0, "scalar": 2, "see": [0, 1, 2], "semant": 2, "separ": [0, 1, 2], "set": 0, "set_array_api_strict_flag": 0, "shape": [0, 2], "should": [0, 2], "signatur": 2, "signific": 2, "silent": 2, "sin": 2, "sinc": 2, "singl": 2, "slice": 2, "so": [0, 2], "solv": 2, "some": [0, 2], "sort": 2, "specifi": [0, 2], "standard": [0, 1, 2], "stdin": 2, "string": 0, "subclass": 2, "submodul": 1, "suffici": 2, "suit": [0, 2], "superfici": 2, "support": [0, 1, 2], "sure": [0, 2], "t": 2, "temporarili": 0, "tensor": 2, "test": [0, 2], "text": 2, "thei": [0, 2], "them": 2, "therefor": 0, "thi": [0, 1, 2], "thin": 2, "thing": 0, "thoroughli": 2, "those": 2, "through": 2, "torch": 2, "traceback": 2, "track": 2, "transcendent": 2, "true": 0, "try": 2, "type": 2, "typeerror": 2, "typic": 0, "unique_": 2, "unique_al": 0, "unique_count": 0, "unique_invers": 0, "unique_valu": 0, "upcom": 2, "us": [0, 1, 2], "usag": [0, 2], "user": [0, 2], "usual": [0, 2], "valid": 2, "valu": 0, "version": [0, 1, 2], "wa": [1, 2], "wai": 2, "were": 0, "when": 0, "where": 2, "whether": 0, "which": [1, 2], "whose": 0, "workaround": 2, "wrap": [1, 2], "wrapper": 2, "x": 2, "xfail": 2, "xp": 2, "you": 2, "zero": 1}, "titles": ["API Reference", "Changelog", "array-api-strict"], "titleterms": {"0": 1, "01": 1, "04": 1, "08": 1, "1": 1, "2024": 1, "24": 1, "29": 1, "api": [0, 2], "arrai": [0, 2], "array_api": 2, "caveat": 2, "changelog": 1, "environ": 0, "flag": 0, "function": 0, "instal": 2, "numpi": 2, "rational": 2, "refer": 0, "relationship": 2, "strict": [0, 2], "variabl": 0}}) \ No newline at end of file