@@ -59,54 +59,59 @@ def set_array_api_strict_flags(
5959 Flags are global variables that enable or disable array-api-strict
6060 behaviors.
6161
62+ The flags can also be changed by setting :ref:`environment variables <environment-variables>`.
63+
6264 .. note::
6365
6466 This function is **not** part of the array API standard. It only exists
6567 in array-api-strict.
6668
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}`` .
7375
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) .
7678
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.
8182
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).
8488
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.
8894
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
9197
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)
96102
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).
99105
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.
103109
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.
107114
108- The flags can also be changed by setting :ref:`environment variables
109- <environment-variables>`.
110115
111116 Examples
112117 --------
0 commit comments