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/number_field/number_field_base.pyx: Handle failing imp…
Browse files Browse the repository at this point in the history
…ort of AA, RLF
  • Loading branch information
Matthias Koeppe committed Oct 26, 2021
1 parent c53d15d commit 26df548
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions src/sage/rings/number_field/number_field_base.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -361,8 +361,16 @@ cdef class NumberField(Field):
if self._gen_approx is not None or self._embedding is None:
return

from sage.rings.qqbar import AA
from sage.rings.real_lazy import RLF
try:
from sage.rings.qqbar import AA
except ImportError:
AA = None

try:
from sage.rings.real_lazy import RLF
except ImportError:
RLF = None

codomain = self._embedding.codomain()
if codomain is AA or codomain is RLF:
self._gen_approx = []
Expand Down

0 comments on commit 26df548

Please sign in to comment.