File tree Expand file tree Collapse file tree 2 files changed +12
-1
lines changed Expand file tree Collapse file tree 2 files changed +12
-1
lines changed Original file line number Diff line number Diff line change @@ -262,7 +262,9 @@ def reset_array_api_strict_flags():
262
262
BOOLEAN_INDEXING = True
263
263
DATA_DEPENDENT_SHAPES = True
264
264
ENABLED_EXTENSIONS = default_extensions
265
-
265
+ array_api_strict .__all__ [:] = sorted (set (ENABLED_EXTENSIONS ) |
266
+ set (array_api_strict .__all__ ) -
267
+ set (default_extensions ))
266
268
267
269
class ArrayAPIStrictFlags :
268
270
"""
Original file line number Diff line number Diff line change @@ -371,6 +371,15 @@ def test_disabled_extensions():
371
371
assert 'linalg' not in ns
372
372
assert 'fft' not in ns
373
373
374
+ reset_array_api_strict_flags ()
375
+ assert 'linalg' in xp .__all__
376
+ assert 'fft' in xp .__all__
377
+ xp .linalg # No error
378
+ xp .fft # No error
379
+ ns = {}
380
+ exec ('from array_api_strict import *' , ns )
381
+ assert 'linalg' in ns
382
+ assert 'fft' in ns
374
383
375
384
def test_environment_variables ():
376
385
# Test that the environment variables work as expected
You can’t perform that action at this time.
0 commit comments