File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -75,18 +75,20 @@ def test_numpy_method(fct, value):
75
75
utt .assert_allclose (np .nan_to_num (f (value )), np .nan_to_num (fct (value )))
76
76
77
77
78
- def test_infix_dot_method ():
78
+ def test_dot_method ():
79
79
X = dmatrix ("X" )
80
80
y = dvector ("y" )
81
81
82
82
res = X .dot (y )
83
83
exp_res = dot (X , y )
84
84
assert equal_computations ([res ], [exp_res ])
85
85
86
+ # This doesn't work. Numpy calls TensorVariable.__rmul__ at some point and everything is messed up
86
87
X_val = np .arange (2 * 3 ).reshape ((2 , 3 ))
87
- res = as_tensor ( X_val ) .dot (y )
88
+ res = X_val .dot (y )
88
89
exp_res = dot (X_val , y )
89
- assert equal_computations ([res ], [exp_res ])
90
+ with pytest .raises (AssertionError ):
91
+ assert equal_computations ([res ], [exp_res ])
90
92
91
93
92
94
def test_infix_matmul_method ():
You can’t perform that action at this time.
0 commit comments