Skip to content

Commit 6c3e420

Browse files
Test that kron raises if total input dims are too small
1 parent 16bb42a commit 6c3e420

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

tests/tensor/test_nlinalg.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -590,6 +590,14 @@ def setup_method(self):
590590
self.op = kron
591591
super().setup_method()
592592

593+
def test_vec_vec_kron_raises(self):
594+
x = vector()
595+
y = vector()
596+
with pytest.raises(
597+
TypeError, match="kron: inputs dimensions must sum to 3 or more"
598+
):
599+
kron(x, y)
600+
593601
@pytest.mark.parametrize("shp0", [(2,), (2, 3), (2, 3, 4), (2, 3, 4, 5)])
594602
@pytest.mark.parametrize("shp1", [(6,), (6, 7), (6, 7, 8), (6, 7, 8, 9)])
595603
def test_perform(self, shp0, shp1):

0 commit comments

Comments
 (0)