(self, shape_a, shape_b)
| 740 | ((2, 0, 0, 2), (2, 0, 2)), |
| 741 | ]) |
| 742 | def test_kron_shape(self, shape_a, shape_b): |
| 743 | a = np.ones(shape_a) |
| 744 | b = np.ones(shape_b) |
| 745 | normalised_shape_a = (1,) * max(0, len(shape_b) - len(shape_a)) + shape_a |
| 746 | normalised_shape_b = (1,) * max(0, len(shape_a) - len(shape_b)) + shape_b |
| 747 | expected_shape = np.multiply(normalised_shape_a, normalised_shape_b) |
| 748 | |
| 749 | k = np.kron(a, b) |
| 750 | assert np.array_equal( |
| 751 | k.shape, expected_shape), "Unexpected shape from kron" |
| 752 | |
| 753 | |
| 754 | class TestTile: |