def test_dot(): """test the dot product of two mixed dimentional vectors""" # Vector dot-product. x = [1, 2, 3] y = [4, 5, 6] z = tnp.dot(x, y) assert z == 32
def test_mdim_dot(): """test the dot product of two mixed dimentional vectors""" # Mixed dim dot-product. x = [1, 2, 3] y = [4, 5, 6, 7] with pytest.raises(IndexError) as execinfo: z = tnp.dot(x, y) assert 'Vector has invalid dimensions' in str(execinfo.value)