(self, shape_a, shape_b)
| 711 | ((2, 0, 0, 2), (2, 0, 2)), |
| 712 | ]) |
| 713 | def test_kron_shape(self, shape_a, shape_b): |
| 714 | a = np.ones(shape_a) |
| 715 | b = np.ones(shape_b) |
| 716 | normalised_shape_a = (1,) * max(0, len(shape_b)-len(shape_a)) + shape_a |
| 717 | normalised_shape_b = (1,) * max(0, len(shape_a)-len(shape_b)) + shape_b |
| 718 | expected_shape = np.multiply(normalised_shape_a, normalised_shape_b) |
| 719 | |
| 720 | k = np.kron(a, b) |
| 721 | assert np.array_equal( |
| 722 | k.shape, expected_shape), "Unexpected shape from kron" |
| 723 | |
| 724 | |
| 725 | class TestTile: |