Skip to content

Commit

Permalink
Merge pull request sympy#12183 from parsoyaarihant/intersection
Browse files Browse the repository at this point in the history
Empty intersection returns UniversalSet
  • Loading branch information
asmeurer authored Feb 18, 2017
2 parents 93eb73d + 99fb2e1 commit 62b1996
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion sympy/sets/sets.py
Original file line number Diff line number Diff line change
Expand Up @@ -1469,7 +1469,7 @@ def flatten(arg):
args = flatten(args)

if len(args) == 0:
return S.EmptySet
return S.UniversalSet

# args can't be ordered for Partition see issue #9608
if 'Partition' not in [type(a).__name__ for a in args]:
Expand Down
2 changes: 2 additions & 0 deletions sympy/sets/tests/test_sets.py
Original file line number Diff line number Diff line change
Expand Up @@ -311,6 +311,8 @@ def test_intersection():

assert Intersection(S.Complexes, FiniteSet(S.ComplexInfinity)) == S.EmptySet

# issue 12178
assert Intersection() == S.UniversalSet

def test_issue_9623():
n = Symbol('n')
Expand Down

0 comments on commit 62b1996

Please sign in to comment.