File tree 1 file changed +4
-3
lines changed
pytensor/tensor/rewriting 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change 2
2
3
3
from pytensor .graph .rewriting .basic import node_rewriter
4
4
from pytensor .tensor import basic as at
5
+ from pytensor .tensor .blas import Dot22
5
6
from pytensor .tensor .elemwise import DimShuffle
6
7
from pytensor .tensor .math import Dot , Prod , dot , log
7
8
from pytensor .tensor .math import pow as at_pow
@@ -31,12 +32,12 @@ def transinv_to_invtrans(fgraph, node):
31
32
32
33
33
34
@register_stabilize
34
- @node_rewriter ([Dot ])
35
+ @node_rewriter ([Dot , Dot22 ])
35
36
def inv_as_solve (fgraph , node ):
36
37
"""
37
38
This utilizes a boolean `symmetric` tag on the matrices.
38
39
"""
39
- if isinstance (node .op , Dot ):
40
+ if isinstance (node .op , ( Dot , Dot22 ) ):
40
41
l , r = node .inputs
41
42
if l .owner and isinstance (l .owner .op , MatrixInverse ):
42
43
return [solve (l .owner .inputs [0 ], r )]
@@ -122,7 +123,7 @@ def cholesky_ldotlt(fgraph, node):
122
123
return
123
124
124
125
A = node .inputs [0 ]
125
- if not (A .owner and isinstance (A .owner .op , Dot )):
126
+ if not (A .owner and isinstance (A .owner .op , ( Dot , Dot22 ) )):
126
127
return
127
128
128
129
l , r = A .owner .inputs
You can’t perform that action at this time.
0 commit comments