@@ -91,22 +91,20 @@ def set_array_api_strict_flags(
91
91
array-api-strict. The default is ``{default_extensions}``. Note that
92
92
some extensions require a minimum version of the standard.
93
93
94
- The default values of the flags can also be changed by setting environment
95
- variables:
96
-
97
- - ``ARRAY_API_STRICT_API_VERSION``: A string representing the version number.
98
- - ``ARRAY_API_STRICT_DATA_DEPENDENT_SHAPES``: "True" or "False".
99
- - ``ARRAY_API_STRICT_ENABLED_EXTENSIONS``: A comma separated list of
100
- extensions to enable.
94
+ The flags can also be changed by setting :ref:`environment variables
95
+ <environment-variables>`.
101
96
102
97
Examples
103
98
--------
104
99
105
100
>>> from array_api_strict import set_array_api_strict_flags
101
+
106
102
>>> # Set the standard version to 2021.12
107
103
>>> set_array_api_strict_flags(api_version="2021.12")
104
+
108
105
>>> # Disable data-dependent shapes
109
106
>>> set_array_api_strict_flags(data_dependent_shapes=False)
107
+
110
108
>>> # Enable only the linalg extension (disable the fft extension)
111
109
>>> set_array_api_strict_flags(enabled_extensions=["linalg"])
112
110
@@ -192,13 +190,17 @@ def reset_array_api_strict_flags():
192
190
"""
193
191
Reset the array-api-strict flags to their default values.
194
192
195
- This will also reset any flags that were set by environment variables.
193
+ This will also reset any flags that were set by :ref:`environment
194
+ variables <environment-variables>` back to their default values.
196
195
197
196
.. note::
198
197
199
198
This function is **not** part of the array API standard. It only exists
200
199
in array-api-strict.
201
200
201
+ See :func:`set_array_api_strict_flags` for a list of flags and their
202
+ default values.
203
+
202
204
Examples
203
205
--------
204
206
@@ -229,7 +231,7 @@ class ArrayAPIStrictFlags:
229
231
This class is **not** part of the array API standard. It only exists
230
232
in array-api-strict.
231
233
232
- See :func:`~.array_api_strict. set_array_api_strict_flags` for a
234
+ See :func:`set_array_api_strict_flags` for a
233
235
description of the available flags.
234
236
235
237
See Also
0 commit comments