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

Commit

Permalink
src/sage/rings/rational_field.py: Remove imports from sage.rings.all
Browse files Browse the repository at this point in the history
  • Loading branch information
Matthias Koeppe committed Jul 16, 2022
1 parent 8431c6c commit 6df82e3
Showing 1 changed file with 11 additions and 10 deletions.
21 changes: 11 additions & 10 deletions src/sage/rings/rational_field.py
Original file line number Diff line number Diff line change
Expand Up @@ -680,17 +680,18 @@ def places(self, all_complex=False, prec=None):
import sage.rings.all
from sage.rings.infinity import Infinity
if prec is None:
R = sage.rings.all.RR
C = sage.rings.all.CC
from sage.rings.real_mpfr import RR as R
from sage.rings.cc import CC as C
elif prec == 53:
R = sage.rings.all.RDF
C = sage.rings.all.CDF
from sage.rings.real_double import RDF as R
from sage.rings.complex_double import CDF as C
elif prec == Infinity:
R = sage.rings.all.AA
C = sage.rings.all.QQbar
from sage.rings.qqbar import AA as R, QQbar as C
else:
R = sage.rings.all.RealField(prec)
C = sage.rings.all.ComplexField(prec)
from sage.rings.real_mpfr import RealField
from sage.rings.complex_mpfr import ComplexField
R = RealField(prec)
C = ComplexField(prec)
domain = C if all_complex else R
return [self.hom([domain(1)])]

Expand Down Expand Up @@ -1082,7 +1083,7 @@ def algebraic_closure(self):
sage: QQ.algebraic_closure()
Algebraic Field
"""
from sage.rings.all import QQbar
from sage.rings.qqbar import QQbar
return QQbar

def order(self):
Expand Down Expand Up @@ -1484,7 +1485,7 @@ def quadratic_defect(self, a, p, check=True):
sage: QQ.quadratic_defect(5, 5)
1
"""
from sage.rings.all import Infinity
from sage.rings.infinity import Infinity
from sage.arith.misc import legendre_symbol
if a not in self:
raise TypeError(str(a) + " must be an element of " + str(self))
Expand Down

0 comments on commit 6df82e3

Please sign in to comment.