From 43f5a6ecd5876a928cb0db57dd0615283a411a17 Mon Sep 17 00:00:00 2001 From: Aaron Meurer Date: Thu, 27 Jun 2024 17:01:22 -0600 Subject: [PATCH] Some small fixes to docs --- array_api_strict/_flags.py | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/array_api_strict/_flags.py b/array_api_strict/_flags.py index 8b46374..62acddf 100644 --- a/array_api_strict/_flags.py +++ b/array_api_strict/_flags.py @@ -81,8 +81,8 @@ def set_array_api_strict_flags( array-api-strict will change the default version to 2023.12. boolean_indexing : bool, optional - Whether indexing by a boolean array is supported. - Note that although boolean array indexing does result in + Whether indexing by a boolean array is supported. This flag is enabled + by default. Note that although boolean array indexing does result in data-dependent shapes, this flag is independent of the `data_dependent_shapes` flag (see below). @@ -276,6 +276,19 @@ class ArrayAPIStrictFlags: See :func:`set_array_api_strict_flags` for a description of the available flags. + Examples + -------- + + >>> from array_api_strict import ArrayAPIStrictFlags, get_array_api_strict_flags + >>> with ArrayAPIStrictFlags(api_version="2022.12", boolean_indexing=False): + ... flags = get_array_api_strict_flags() + >>> flags + {'api_version': '2022.12', + 'boolean_indexing': False, + 'data_dependent_shapes': True, + 'enabled_extensions': ('linalg', 'fft') + } + See Also --------