Skip to content

Commit d731ac9

Browse files
committed
Replace defaultdict(int) with Counter in rewriting/elemwise
1 parent 704bf3c commit d731ac9

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

pytensor/tensor/rewriting/elemwise.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import itertools
22
import sys
3-
from collections import defaultdict, deque
3+
from collections import Counter, defaultdict, deque
44
from collections.abc import Generator
55
from functools import cache
66
from typing import TypeVar
@@ -127,7 +127,7 @@ def apply(self, fgraph):
127127
"nb_call_replace": 0,
128128
"nb_call_validate": 0,
129129
"nb_inconsistent": 0,
130-
"ndim": defaultdict(int),
130+
"ndim": Counter(),
131131
}
132132

133133
check_each_change = config.tensor__insert_inplace_optimizer_validate_nb

0 commit comments

Comments
 (0)