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

Commit

Permalink
src/sage/sets/finite_set_map_cy.pyx: Do not use Set_object_enumerated…
Browse files Browse the repository at this point in the history
… directly
  • Loading branch information
mkoeppe committed Sep 1, 2022
1 parent 8c1212b commit f117aa2
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/sage/sets/finite_set_map_cy.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ AUTHORS:
from sage.structure.list_clone cimport ClonableIntArray
from sage.structure.parent cimport Parent
from sage.arith.power cimport generic_power
from sage.sets.set import Set_object_enumerated
from sage.sets.set import Set


cpdef fibers(f, domain):
Expand Down Expand Up @@ -92,7 +92,7 @@ cpdef fibers(f, domain):
y = f(x)
result.setdefault(y, set()).add(x)
for x, v in result.iteritems():
result[x] = Set_object_enumerated(v)
result[x] = Set(v)
return result


Expand Down Expand Up @@ -297,7 +297,7 @@ cdef class FiniteSetMap_MN(ClonableIntArray):
sage: FiniteSetMaps(4, 3)([1, 0, 0, 1]).image_set()
{0, 1}
"""
return Set_object_enumerated(self)
return Set(self)

cpdef fibers(self):
"""
Expand Down Expand Up @@ -505,7 +505,7 @@ cdef class FiniteSetMap_Set(FiniteSetMap_MN):
{'c'}
"""
image_i = self._parent._unrank_codomain
return Set_object_enumerated([image_i(i) for i in self])
return Set([image_i(i) for i in self])

cpdef setimage(self, i, j):
"""
Expand Down

0 comments on commit f117aa2

Please sign in to comment.