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():
262262 BOOLEAN_INDEXING = True
263263 DATA_DEPENDENT_SHAPES = True
264264 ENABLED_EXTENSIONS = default_extensions
265-
265+ array_api_strict .__all__ [:] = sorted (set (ENABLED_EXTENSIONS ) |
266+ set (array_api_strict .__all__ ) -
267+ set (default_extensions ))
266268
267269class ArrayAPIStrictFlags :
268270 """
Original file line number Diff line number Diff line change @@ -371,6 +371,15 @@ def test_disabled_extensions():
371371 assert 'linalg' not in ns
372372 assert 'fft' not in ns
373373
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
374383
375384def test_environment_variables ():
376385 # Test that the environment variables work as expected
You can’t perform that action at this time.
0 commit comments