(input_shapes, expected_shape)
| 12 | |
| 13 | |
| 14 | def assert_shapes_correct(input_shapes, expected_shape): |
| 15 | # Broadcast a list of arrays with the given input shapes and check the |
| 16 | # common output shape. |
| 17 | |
| 18 | inarrays = [np.zeros(s) for s in input_shapes] |
| 19 | outarrays = broadcast_arrays(*inarrays) |
| 20 | outshapes = [a.shape for a in outarrays] |
| 21 | expected = [expected_shape] * len(inarrays) |
| 22 | assert_equal(outshapes, expected) |
| 23 | |
| 24 | |
| 25 | def assert_incompatible_shapes_raise(input_shapes): |
no test coverage detected