Skip to content

Commit

Permalink
Make self.lookup before self.symbols to avoid confusion in Product.__…
Browse files Browse the repository at this point in the history
…init__
  • Loading branch information
Feras A. Saad committed Feb 17, 2020
1 parent e4cbe0c commit 7a61648
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/distributions.py
Original file line number Diff line number Diff line change
Expand Up @@ -243,8 +243,8 @@ def __init__(self, distributions):
symbols = [d.get_symbols() for d in self.distributions]
if not are_disjoint(symbols):
raise ValueError('Product must have disjoint symbols')
self.symbols = frozenset(get_union(symbols))
self.lookup = {s:i for i, syms in enumerate(symbols) for s in syms}
self.symbols = frozenset(get_union(symbols))

def get_symbols(self):
return self.symbols
Expand Down

0 comments on commit 7a61648

Please sign in to comment.