File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed
pytensor/tensor/rewriting Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -599,7 +599,7 @@ def rewrite_inv_inv(fgraph, node):
599
599
valid_solves = (Solve , SolveTriangular )
600
600
# Check if its a valid inverse operation (either inv/pinv or if its solve, then b = eye)
601
601
inv_check = False
602
- if hasattr (node .op , "core_op" ) and isinstance (node .op .core_op , valid_inverses ):
602
+ if isinstance (node .op , Blockwise ) and isinstance (node .op .core_op , valid_inverses ):
603
603
inv_check = True
604
604
if isinstance (node .op .core_op , valid_solves ):
605
605
inv_check = _find_solve_with_eye (node )
@@ -613,7 +613,7 @@ def rewrite_inv_inv(fgraph, node):
613
613
614
614
# Check if its a valid inverse operation (either inv/pinv or if its solve, then b = eye)
615
615
inv_check = False
616
- if hasattr (potential_inner_inv .op , "core_op" ) and isinstance (
616
+ if isinstance (potential_inner_inv .op , Blockwise ) and isinstance (
617
617
potential_inner_inv .op .core_op , valid_inverses
618
618
):
619
619
inv_check = True
You can’t perform that action at this time.
0 commit comments