Skip to content

Commit dba6c55

Browse files
committed
Fast Scan equality for same identity
1 parent c2da78f commit dba6c55

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

pytensor/scan/op.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1248,6 +1248,9 @@ def is_cpu_vector(s):
12481248
return apply_node
12491249

12501250
def __eq__(self, other):
1251+
if self is other:
1252+
return True
1253+
12511254
if type(self) is not type(other):
12521255
return False
12531256

0 commit comments

Comments
 (0)