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

Function assert_incompatible_shapes_raise

numpy/lib/tests/test_stride_tricks.py:25–30  ·  view source on GitHub ↗
(input_shapes)

Source from the content-addressed store, hash-verified

23
24
25def assert_incompatible_shapes_raise(input_shapes):
26 # Broadcast a list of arrays with the given (incompatible) input shapes
27 # and check that they raise a ValueError.
28
29 inarrays = [np.zeros(s) for s in input_shapes]
30 assert_raises(ValueError, broadcast_arrays, *inarrays)
31
32
33def assert_same_as_ufunc(shape0, shape1, transposed=False, flipped=False):

Calls 1

assert_raisesFunction · 0.90

Tested by

no test coverage detected