Skip to content

Commit

Permalink
Removes old ordered dict
Browse files Browse the repository at this point in the history
  • Loading branch information
dgasmith committed Jul 10, 2024
1 parent 9d3f5eb commit 3a8f0b0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions opt_einsum/paths.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
import operator
import random
import re
from collections import Counter, OrderedDict, defaultdict
from collections import Counter, defaultdict
from typing import Any, Callable, Dict, FrozenSet, Generator, List, Optional, Sequence, Set, Tuple, Union
from typing import Counter as CounterType

Expand Down Expand Up @@ -1219,7 +1219,7 @@ def __call__(
# tensor j is in the set, e.g. 0b100101 = {0,2,5}; set unions
# (intersections) can then be computed by bitwise or (and);
x: List[Any] = [None] * 2 + [{} for j in range(len(g) - 1)]
x[1] = OrderedDict((1 << j, (inputs[j], 0, inputs_contractions[j])) for j in g)
x[1] = {1 << j: (inputs[j], 0, inputs_contractions[j]) for j in g}

# convert set of tensors g to a bitmap set:
bitmap_g = functools.reduce(lambda x, y: x | y, (1 << j for j in g))
Expand Down

0 comments on commit 3a8f0b0

Please sign in to comment.