File tree Expand file tree Collapse file tree 2 files changed +11
-1
lines changed Expand file tree Collapse file tree 2 files changed +11
-1
lines changed Original file line number Diff line number Diff line change @@ -140,7 +140,7 @@ def set_array_api_strict_flags(
140
140
)
141
141
ENABLED_EXTENSIONS = tuple (enabled_extensions )
142
142
else :
143
- ENABLED_EXTENSIONS = tuple ([ext for ext in all_extensions if extension_versions [ext ] <= API_VERSION ])
143
+ ENABLED_EXTENSIONS = tuple ([ext for ext in ENABLED_EXTENSIONS if extension_versions [ext ] <= API_VERSION ])
144
144
145
145
# We have to do this separately or it won't get added as the docstring
146
146
set_array_api_strict_flags .__doc__ = set_array_api_strict_flags .__doc__ .format (
Original file line number Diff line number Diff line change @@ -42,6 +42,16 @@ def test_flags():
42
42
assert flags == {
43
43
'api_version' : '2021.12' ,
44
44
'data_dependent_shapes' : False ,
45
+ 'enabled_extensions' : (),
46
+ }
47
+ reset_array_api_strict_flags ()
48
+
49
+ with pytest .warns (UserWarning ):
50
+ set_array_api_strict_flags (api_version = '2021.12' )
51
+ flags = get_array_api_strict_flags ()
52
+ assert flags == {
53
+ 'api_version' : '2021.12' ,
54
+ 'data_dependent_shapes' : True ,
45
55
'enabled_extensions' : ('linalg' ,),
46
56
}
47
57
You can’t perform that action at this time.
0 commit comments