Skip to content

Commit

Permalink
modify what is being replaced
Browse files Browse the repository at this point in the history
  • Loading branch information
smichr committed Nov 22, 2021
1 parent 4905130 commit cb4e88d
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions sympy/concrete/expr_with_limits.py
Original file line number Diff line number Diff line change
Expand Up @@ -312,8 +312,9 @@ def free_symbols(self):
# should be returned, e.g. don't return set() if the
# function is zero -- treat it like an unevaluated expression.
function, limits = self.function, self.limits
# mask off non-symbol integration variables
reps = {i[0]: i[0] if isinstance(i[0], Symbol) else Dummy()
# mask off non-symbol integration variables that have
# more than themself as a free symbol
reps = {i[0]: i[0] if i[0].free_symbols == {i[0]} else Dummy()
for i in self.limits}
function = function.xreplace(reps)
isyms = function.free_symbols
Expand Down

0 comments on commit cb4e88d

Please sign in to comment.