File tree Expand file tree Collapse file tree 3 files changed +5
-15
lines changed
Expand file tree Collapse file tree 3 files changed +5
-15
lines changed Original file line number Diff line number Diff line change @@ -375,17 +375,12 @@ def __gt__(self, other):
375375 def __ge__ (self , other ):
376376 return ge (self , other )
377377
378- def __dot__ (left , right ):
379- return structured_dot (left , right )
380-
381- def __rdot__ (right , left ):
382- return structured_dot (left , right )
378+ def dot (self , other ):
379+ return structured_dot (self , other )
383380
384381 def sum (self , axis = None , sparse_grad = False ):
385382 return sp_sum (self , axis = axis , sparse_grad = sparse_grad )
386383
387- dot = __dot__
388-
389384 def toarray (self ):
390385 return dense_from_sparse (self )
391386
Original file line number Diff line number Diff line change @@ -640,13 +640,8 @@ def dtype(self):
640640 """The dtype of this tensor."""
641641 return self .type .dtype
642642
643- def __dot__ (left , right ):
644- return at .math .dense_dot (left , right )
645-
646- def __rdot__ (right , left ):
647- return at .math .dense_dot (left , right )
648-
649- dot = __dot__
643+ def dot (self , other ):
644+ return at .math_dense_dot (self , other )
650645
651646 def __matmul__ (left , right ):
652647 return at .math .matmul (left , right )
Original file line number Diff line number Diff line change @@ -75,7 +75,7 @@ def test_numpy_method(fct, value):
7575 utt .assert_allclose (np .nan_to_num (f (value )), np .nan_to_num (fct (value )))
7676
7777
78- def test_infix_dot_method ():
78+ def test_dot_method ():
7979 X = dmatrix ("X" )
8080 y = dvector ("y" )
8181
You can’t perform that action at this time.
0 commit comments