(input_shapes, expected_shape)
| 20 | |
| 21 | |
| 22 | def assert_shapes_correct(input_shapes, expected_shape): |
| 23 | # Broadcast a list of arrays with the given input shapes and check the |
| 24 | # common output shape. |
| 25 | |
| 26 | inarrays = [np.zeros(s) for s in input_shapes] |
| 27 | outarrays = broadcast_arrays(*inarrays) |
| 28 | outshapes = [a.shape for a in outarrays] |
| 29 | expected = [expected_shape] * len(inarrays) |
| 30 | assert_equal(outshapes, expected) |
| 31 | |
| 32 | |
| 33 | def assert_incompatible_shapes_raise(input_shapes): |
no test coverage detected
searching dependent graphs…