Skip to content

Commit

Permalink
Fix assertion:
Browse files Browse the repository at this point in the history
len-check should be on s2t, since that's what the lookup is on
  • Loading branch information
vanschelven committed Apr 19, 2018
1 parent f9f9094 commit feea3b2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion spacetime.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@

def st_sanity(t2s, s2t):
for (t, s) in enumerate(t2s):
assert s is None or (0 <= s <= len(t2s) - 1 and s2t[s] == t), "%s <X> %s" % (s2t, t2s)
assert s is None or (0 <= s <= len(s2t) - 1 and s2t[s] == t), "%s <X> %s" % (s2t, t2s)

for (s, t) in enumerate(s2t):
assert 0 <= t <= len(t2s) - 1 and t2s[t] == s, "%s <X> %s" % (s2t, t2s)
Expand Down

0 comments on commit feea3b2

Please sign in to comment.