Skip to content
This repository has been archived by the owner on Jan 30, 2023. It is now read-only.

Commit

Permalink
SymbolicRing: Allow converting all Set_base instances to SR
Browse files Browse the repository at this point in the history
  • Loading branch information
Matthias Koeppe committed Jul 2, 2021
1 parent 473cd41 commit a5459f4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/sage/symbolic/ring.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -406,9 +406,9 @@ cdef class SymbolicRing(CommutativeRing):
return prod([SR(p)**e for p,e in x], SR(x.unit()))
elif x in Sets():
from sage.rings.all import NN, ZZ, QQ, AA
from sage.sets.real_set import RealSet
from sage.sets.set import Set_base
if (x.is_finite() or x in (NN, ZZ, QQ, AA)
or isinstance(x, RealSet)):
or isinstance(x, Set_base)):
exp = x
else:
raise TypeError(f"unable to convert {x!r} to a symbolic expression")
Expand Down

0 comments on commit a5459f4

Please sign in to comment.