MCPcopy Create free account
hub / github.com/numpy/numpy / test_broadcast_shapes_raises

Function test_broadcast_shapes_raises

numpy/lib/tests/test_stride_tricks.py:337–351  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

335
336
337def test_broadcast_shapes_raises():
338 # tests public broadcast_shapes
339 data = [
340 [(3,), (4,)],
341 [(2, 3), (2,)],
342 [(3,), (3,), (4,)],
343 [(1, 3, 4), (2, 3, 3)],
344 [(1, 2), (3,1), (3,2), (10, 5)],
345 [2, (2, 3)],
346 ]
347 for input_shapes in data:
348 assert_raises(ValueError, lambda: broadcast_shapes(*input_shapes))
349
350 bad_args = [(2,)] * 32 + [(3,)] * 32
351 assert_raises(ValueError, lambda: broadcast_shapes(*bad_args))
352
353
354def test_as_strided():

Callers

nothing calls this directly

Calls 2

assert_raisesFunction · 0.90
broadcast_shapesFunction · 0.90

Tested by

no test coverage detected