Skip to content

Commit

Permalink
Replace float('inf') with infinity
Browse files Browse the repository at this point in the history
Suggested by tscrim
  • Loading branch information
gmou3 committed Jan 29, 2024
1 parent d3abe5a commit 58521e5
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/sage/matroids/matroid.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -5986,8 +5986,8 @@ cdef class Matroid(SageObject):
EXAMPLES::
sage: matroids.Uniform(5,5).girth()
inf
sage: matroids.Uniform(5, 5).girth()
+Infinity
sage: matroids.catalog.K4().girth()
3
sage: matroids.catalog.Vamos().girth()
Expand All @@ -6002,7 +6002,8 @@ cdef class Matroid(SageObject):
X = frozenset(X)
if self._is_circuit(X):
return k
return float('inf')
from sage.rings.infinity import infinity
return infinity

# representability

Expand Down

0 comments on commit 58521e5

Please sign in to comment.