Skip to content

Commit 166c02f

Browse files
author
Matthias Koeppe
committed
src/sage/arith/misc.py: Fix test for non-QQ number field
1 parent aa220c4 commit 166c02f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/sage/arith/misc.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -562,8 +562,8 @@ def is_prime(n):
562562
R = n.parent()
563563
if R.is_field():
564564
# number fields redefine .is_prime(), see #32340
565-
from sage.rings.number_field.number_field import NumberField_generic
566-
if not isinstance(R, NumberField_generic):
565+
from sage.rings.number_field.number_field_base import NumberField
566+
if R is QQ or not isinstance(R, NumberField):
567567
import warnings
568568
s = f'Testing primality in {R}, which is a field, ' \
569569
'hence the result will always be False. '

0 commit comments

Comments
 (0)