@@ -59,54 +59,59 @@ def set_array_api_strict_flags(
59
59
Flags are global variables that enable or disable array-api-strict
60
60
behaviors.
61
61
62
+ The flags can also be changed by setting :ref:`environment variables <environment-variables>`.
63
+
62
64
.. note::
63
65
64
66
This function is **not** part of the array API standard. It only exists
65
67
in array-api-strict.
66
68
67
- - `api_version`: The version of the standard to use. Supported
68
- versions are: ``{supported_versions}``. The default version number is
69
- ``{default_version!r}``.
70
-
71
- Note that 2021.12 is supported, but currently gives the same thing as
72
- 2022.12 (except that the fft extension will be disabled) .
69
+ Parameters
70
+ ----------
71
+ api_version : str, optional
72
+ The version of the standard to use. Supported versions are:
73
+ ``{supported_versions}``. The default version number is
74
+ ``{default_version!r}`` .
73
75
74
- 2023 .12 support is experimental. Some features in 2023.12 may still be
75
- missing, and it hasn't been fully tested .
76
+ Note that 2021 .12 is supported, but currently gives the same thing as
77
+ 2022.12 (except that the fft extension will be disabled) .
76
78
77
- - `boolean_indexing`: Whether indexing by a boolean array is supported.
78
- Note that although boolean array indexing does result in data-dependent
79
- shapes, this flag is independent of the `data_dependent_shapes` flag
80
- (see below).
79
+ 2023.12 support is experimental. Some features in 2023.12 may still be
80
+ missing, and it hasn't been fully tested. A future version of
81
+ array-api-strict will change the default version to 2023.12.
81
82
82
- - `data_dependent_shapes`: Whether data-dependent shapes are enabled in
83
- array-api-strict.
83
+ boolean_indexing : bool, optional
84
+ Whether indexing by a boolean array is supported.
85
+ Note that although boolean array indexing does result in
86
+ data-dependent shapes, this flag is independent of the
87
+ `data_dependent_shapes` flag (see below).
84
88
85
- This flag is enabled by default. Array libraries that use computation
86
- graphs may not be able to support functions whose output shapes depend
87
- on the input data.
89
+ data_dependent_shapes : bool, optional
90
+ Whether data-dependent shapes are enabled in array-api-strict.
91
+ This flag is enabled by default. Array libraries that use computation
92
+ graphs may not be able to support functions whose output shapes depend
93
+ on the input data.
88
94
89
- The functions that make use of data-dependent shapes, and are therefore
90
- disabled by setting this flag to False are
95
+ The functions that make use of data-dependent shapes, and are therefore
96
+ disabled by setting this flag to False are
91
97
92
- - `unique_all()`, `unique_counts()`, `unique_inverse()`, and `unique_values()`.
93
- - `nonzero()`
94
- - `repeat()` when the `repeats` argument is an array (requires 2023.12
95
- version of the standard)
98
+ - `unique_all()`, `unique_counts()`, `unique_inverse()`, and `unique_values()`.
99
+ - `nonzero()`
100
+ - `repeat()` when the `repeats` argument is an array (requires the
101
+ 2023.12 version of the standard)
96
102
97
- Note that while boolean indexing is also data-dependent, it is
98
- controlled by a separate `boolean_indexing` flag (see above).
103
+ Note that while boolean indexing is also data-dependent, it is
104
+ controlled by a separate `boolean_indexing` flag (see above).
99
105
100
- See
101
- https://data-apis.org/array-api/latest/design_topics/data_dependent_output_shapes.html
102
- for more details.
106
+ See
107
+ https://data-apis.org/array-api/latest/design_topics/data_dependent_output_shapes.html
108
+ for more details.
103
109
104
- - `enabled_extensions`: A list of extensions that are enabled in
105
- array-api-strict. The default is ``{default_extensions}``. Note that
106
- some extensions require a minimum version of the standard.
110
+ enabled_extensions : list of str, optional
111
+ A list of extensions that are enabled in array-api-strict. The default
112
+ is ``{default_extensions}``. Note that some extensions require a
113
+ minimum version of the standard.
107
114
108
- The flags can also be changed by setting :ref:`environment variables
109
- <environment-variables>`.
110
115
111
116
Examples
112
117
--------
0 commit comments