@@ -85,7 +85,7 @@ cdef class FlatsMatroid(Matroid):
8585 self ._F[i].add(frozenset (F))
8686 self ._matroid_rank = max (self ._F, default = - 1 )
8787
88- cpdef groundset(self ) noexcept :
88+ cpdef groundset(self ):
8989 """
9090 Return the groundset of the matroid.
9191
@@ -102,7 +102,7 @@ cdef class FlatsMatroid(Matroid):
102102 """
103103 return self ._groundset
104104
105- cpdef _rank(self , X) noexcept :
105+ cpdef _rank(self , X):
106106 """
107107 Return the rank of a set ``X``.
108108
@@ -138,7 +138,7 @@ cdef class FlatsMatroid(Matroid):
138138
139139 # optional
140140
141- cpdef full_rank(self ) noexcept :
141+ cpdef full_rank(self ):
142142 r """
143143 Return the rank of the matroid.
144144
@@ -156,7 +156,7 @@ cdef class FlatsMatroid(Matroid):
156156 """
157157 return self ._matroid_rank
158158
159- cpdef _is_isomorphic(self , other, certificate = False ) noexcept :
159+ cpdef _is_isomorphic(self , other, certificate = False ):
160160 """
161161 Test if ``self`` is isomorphic to ``other``.
162162
@@ -286,12 +286,7 @@ cdef class FlatsMatroid(Matroid):
286286 sage: M.groundset() is N.groundset()
287287 True
288288 """
289- N = FlatsMatroid(groundset = [], flats = {})
290- N._groundset = self ._groundset
291- N._F = self ._F
292- N._matroid_rank = self ._matroid_rank
293- N.rename(self .get_custom_name())
294- return N
289+ return self
295290
296291 def __deepcopy__ (self , memo = None ):
297292 """
@@ -309,15 +304,9 @@ cdef class FlatsMatroid(Matroid):
309304 sage: M == N
310305 True
311306 sage: M.groundset() is N.groundset()
312- False
307+ True
313308 """
314- if memo is None :
315- memo = {}
316- from copy import deepcopy
317- # Since matroids are immutable, N cannot reference itself in correct code, so no need to worry about the recursion.
318- N = FlatsMatroid(groundset = deepcopy(self ._groundset, memo), flats = deepcopy(self ._F, memo))
319- N.rename(deepcopy(self .get_custom_name(), memo))
320- return N
309+ return self
321310
322311 def __reduce__ (self ):
323312 """
@@ -349,7 +338,7 @@ cdef class FlatsMatroid(Matroid):
349338
350339 # enumeration
351340
352- cpdef flats(self , k) noexcept :
341+ cpdef flats(self , k):
353342 r """
354343 Return the flats of the matroid of specified rank.
355344
@@ -394,7 +383,7 @@ cdef class FlatsMatroid(Matroid):
394383 for F in self ._F[k]:
395384 yield F
396385
397- cpdef whitney_numbers2(self ) noexcept :
386+ cpdef whitney_numbers2(self ):
398387 r """
399388 Return the Whitney numbers of the second kind of the matroid.
400389
@@ -425,7 +414,7 @@ cdef class FlatsMatroid(Matroid):
425414
426415 # verification
427416
428- cpdef is_valid(self ) noexcept :
417+ cpdef is_valid(self ):
429418 r """
430419 Test if ``self`` obeys the matroid axioms.
431420
0 commit comments