Skip to content

Commit

Permalink
sage: Fix printing of errors
Browse files Browse the repository at this point in the history
Python 3 often returns iterable map objects where Python 2 returned
list. We can just them down to lists explicitly.

Overlooked in 13c88ef.
  • Loading branch information
real-or-random committed Jan 31, 2022
1 parent e108d00 commit b54d843
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion sage/group_prover.sage
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,7 @@ def prove_zero(R, exprs, assume):
"""Check whether all of the passed expressions are provably zero, given assumptions"""
r, e = prove_nonzero(R, dict(map(lambda x: (fastfrac(R, x.bot, 1), exprs[x]), exprs)), assume)
if not r:
return (False, map(lambda x: "Possibly zero denominator: %s" % x, e))
return (False, list(map(lambda x: "Possibly zero denominator: %s" % x, e)))
zero = R.ideal(list(map(numerator, assume.zero)))
nonzero = prod(x for x in assume.nonzero)
expl = []
Expand Down

0 comments on commit b54d843

Please sign in to comment.