Skip to content

Commit 704bf3c

Browse files
committed
Replace defaultdict(int) with Counter in pkl_utils
1 parent 7815ebe commit 704bf3c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

pytensor/misc/pkl_utils.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
import sys
1111
import tempfile
1212
import zipfile
13-
from collections import defaultdict
13+
from collections import Counter
1414
from contextlib import closing
1515
from io import BytesIO
1616
from pickle import HIGHEST_PROTOCOL
@@ -144,7 +144,7 @@ class PersistentSharedVariableID(PersistentNdarrayID):
144144

145145
def __init__(self, zip_file, allow_unnamed=True, allow_duplicates=True):
146146
super().__init__(zip_file)
147-
self.name_counter = defaultdict(int)
147+
self.name_counter = Counter()
148148
self.ndarray_names = {}
149149
self.allow_unnamed = allow_unnamed
150150
self.allow_duplicates = allow_duplicates

0 commit comments

Comments
 (0)