@@ -191,42 +191,23 @@ def _numpy_second(x, y):
191
191
name = "SecondBroadcastTester" ,
192
192
op = second ,
193
193
expected = _numpy_second ,
194
- good = dict (
195
- itertools .chain (
196
- multi_dtype_checks ((4 , 5 ), (5 ,)),
197
- multi_dtype_checks ((2 , 3 , 2 ), (3 , 2 )),
198
- multi_dtype_checks ((2 , 3 , 2 ), (2 ,)),
199
- )
200
- ),
201
- # I can't think of any way to make this fail at build time
202
- # Just some simple smoke tests
194
+ good = dict (multi_dtype_checks ((4 , 2 , 3 , 2 ), (3 , 2 ))),
203
195
bad_runtime = dict (
204
196
fail1 = (random (5 , 4 ), random (5 )),
205
197
fail2 = (random (3 , 2 , 3 ), random (6 , 9 )),
206
198
fail3 = (integers (6 , 2 , 9 ), random (3 , 2 )),
207
199
),
208
200
)
209
201
210
- # We exclude local_fill_to_alloc because it optimizes the "second" node
211
- # away from the graph.
202
+ # We exclude local_fill_to_alloc because it optimizes the "second" node away from the graph.
212
203
TestSecondSameRank = makeTester (
213
204
name = "SecondSameRankTester" ,
214
205
op = second ,
215
206
expected = _numpy_second ,
216
- good = dict (
217
- itertools .chain (
218
- multi_dtype_checks ((4 , 5 ), (4 , 5 )),
219
- multi_dtype_checks ((1 , 2 ), (3 , 2 )),
220
- multi_dtype_checks ((3 , 2 ), (1 , 2 )),
221
- )
222
- ),
223
- # These sizes are not broadcastable to one another
224
- # and SHOULD raise an error, but currently don't.
207
+ good = dict (multi_dtype_checks ((4 , 5 ), (4 , 1 ))),
225
208
bad_runtime = dict (
226
- itertools .chain (
227
- multi_dtype_checks ((4 , 5 ), (5 , 4 )),
228
- multi_dtype_checks ((1 , 5 ), (5 , 4 )),
229
- )
209
+ fail1 = (random (4 , 5 ), random (5 , 4 )),
210
+ fail2 = (integers (1 , 5 ), integers (5 , 4 )),
230
211
),
231
212
mode = get_default_mode ().excluding ("local_fill_to_alloc" , "local_useless_fill" ),
232
213
)
0 commit comments