We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 58fb850 commit 931297fCopy full SHA for 931297f
tests/tensor/test_variable.py
@@ -75,18 +75,20 @@ def test_numpy_method(fct, value):
75
utt.assert_allclose(np.nan_to_num(f(value)), np.nan_to_num(fct(value)))
76
77
78
-def test_infix_dot_method():
+def test_dot_method():
79
X = dmatrix("X")
80
y = dvector("y")
81
82
res = X.dot(y)
83
exp_res = dot(X, y)
84
assert equal_computations([res], [exp_res])
85
86
+ # This doesn't work. Numpy calls TensorVariable.__rmul__ at some point and everything is messed up
87
X_val = np.arange(2 * 3).reshape((2, 3))
- res = as_tensor(X_val).dot(y)
88
+ res = X_val.dot(y)
89
exp_res = dot(X_val, y)
- assert equal_computations([res], [exp_res])
90
+ with pytest.raises(AssertionError):
91
+ assert equal_computations([res], [exp_res])
92
93
94
def test_infix_matmul_method():
0 commit comments