Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sage.sets: Modularization fixes (imports) #38751

Open
wants to merge 2 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion src/sage/sets/disjoint_set.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,10 @@ from sage.rings.integer cimport Integer
from sage.structure.sage_object cimport SageObject
from cpython.object cimport PyObject_RichCompare
from sage.groups.perm_gps.partn_ref.data_structures cimport *
from sage.combinat.set_partition import SetPartition
from sage.misc.lazy_import import LazyImport

SetPartition = LazyImport('sage.combinat.set_partition', 'SetPartition')


cpdef DisjointSet(arg):
r"""
Expand Down
2 changes: 1 addition & 1 deletion src/sage/sets/image_set.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@
from sage.misc.cachefunc import cached_method
from sage.rings.infinity import Infinity
from sage.rings.integer import Integer
from sage.modules.free_module import FreeModule
from sage.structure.element import Expression
from sage.structure.parent import Parent

Expand Down Expand Up @@ -91,6 +90,7 @@ def __init__(self, map, domain_subset, *, category=None, is_injective=None, inve
if isinstance(map, Expression) and map.is_callable():
domain = map.parent().base()
if len(map.arguments()) != 1:
from sage.modules.free_module import FreeModule
domain = FreeModule(domain, len(map.arguments()))
function = map

Expand Down
Loading