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 aa220c4 commit 166c02fCopy full SHA for 166c02f
src/sage/arith/misc.py
@@ -562,8 +562,8 @@ def is_prime(n):
562
R = n.parent()
563
if R.is_field():
564
# 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):
+ from sage.rings.number_field.number_field_base import NumberField
+ if R is QQ or not isinstance(R, NumberField):
567
import warnings
568
s = f'Testing primality in {R}, which is a field, ' \
569
'hence the result will always be False. '
0 commit comments