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

Commit

Permalink
Set_object.cardinality: Check category
Browse files Browse the repository at this point in the history
  • Loading branch information
Matthias Koeppe committed Aug 19, 2022
1 parent e63e4f0 commit 970d467
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/sage/sets/set.py
Original file line number Diff line number Diff line change
Expand Up @@ -676,6 +676,9 @@ def cardinality(self):
sage: Set(GF(5^2,'a')).cardinality()
25
"""
if self in Sets().Infinite():
return sage.rings.infinity.infinity

if not self.is_finite():
return sage.rings.infinity.infinity

Expand Down

0 comments on commit 970d467

Please sign in to comment.