We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0fd5967 commit d726613Copy full SHA for d726613
src/sage/rings/number_field/number_field_base.pyx
@@ -135,13 +135,15 @@ cdef class NumberField(Field):
135
else:
136
codomain_other = other
137
138
- from sage.rings.qqbar import AA
139
- if codomain_self is AA and codomain_other is AA:
140
- return AA
141
-
142
- from sage.rings.qqbar import QQbar
143
- if codomain_self in (AA, QQbar) and codomain_other in (AA, QQbar):
144
- return QQbar
+ try:
+ from sage.rings.qqbar import AA, QQbar
+ except ImportError:
+ pass
+ else:
+ if codomain_self is AA and codomain_other is AA:
+ return AA
145
+ if codomain_self in (AA, QQbar) and codomain_other in (AA, QQbar):
146
+ return QQbar
147
148
def ring_of_integers(self, *args, **kwds):
149
r"""
0 commit comments