@@ -55,6 +55,7 @@ def test_flags():
55
55
flags = get_array_api_strict_flags ()
56
56
assert flags == {
57
57
'api_version' : '2021.12' ,
58
+ 'boolean_indexing' : True ,
58
59
'data_dependent_shapes' : True ,
59
60
'enabled_extensions' : ('linalg' ,),
60
61
}
@@ -68,6 +69,7 @@ def test_flags():
68
69
flags = get_array_api_strict_flags ()
69
70
assert flags == {
70
71
'api_version' : '2023.12' ,
72
+ 'boolean_indexing' : True ,
71
73
'data_dependent_shapes' : True ,
72
74
'enabled_extensions' : ('linalg' , 'fft' ),
73
75
}
@@ -132,6 +134,8 @@ def test_data_dependent_shapes():
132
134
pytest .raises (RuntimeError , lambda : unique_inverse (a ))
133
135
pytest .raises (RuntimeError , lambda : unique_values (a ))
134
136
pytest .raises (RuntimeError , lambda : nonzero (a ))
137
+ pytest .raises (RuntimeError , lambda : repeat (a , repeats ))
138
+ repeat (a , 2 ) # Should never error
135
139
a [mask ] # No error (boolean indexing is a separate flag)
136
140
137
141
def test_boolean_indexing ():
@@ -144,8 +148,6 @@ def test_boolean_indexing():
144
148
set_array_api_strict_flags (boolean_indexing = False )
145
149
146
150
pytest .raises (RuntimeError , lambda : a [mask ])
147
- pytest .raises (RuntimeError , lambda : repeat (a , repeats ))
148
- repeat (a , 2 ) # Should never error
149
151
150
152
linalg_examples = {
151
153
'cholesky' : lambda : xp .linalg .cholesky (xp .eye (3 )),
0 commit comments