Skip to content

Commit 59e2efa

Browse files
committed
fix doc for elements_of_norm
1 parent cc60cfe commit 59e2efa

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

src/sage/rings/number_field/number_field.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@
104104
# the License, or (at your option) any later version.
105105
# https://www.gnu.org/licenses/
106106
# ****************************************************************************
107-
107+
from __future__ import annotations
108108
from sage.misc.cachefunc import cached_method
109109
from sage.misc.superseded import (deprecation,
110110
deprecated_function_alias)
@@ -5726,13 +5726,13 @@ def trace_dual_basis(self, b):
57265726
raise ValueError('Not a basis of the number field.')
57275727
return [sum([v[i]*b[i] for i in range(len(b))]) for v in M.inverse()]
57285728

5729-
def elements_of_norm(self, n, proof=None):
5729+
def elements_of_norm(self, n, proof=None) -> list:
57305730
"""
5731-
Return a list of elements of norm ``n``.
5731+
Return a list of elements of norm `n`.
57325732
57335733
INPUT:
57345734
5735-
- ``n`` -- integer in this number field
5735+
- `n` -- integer
57365736
57375737
- ``proof`` -- boolean (default: ``True``, unless you called
57385738
:meth:`proof.number_field` and set it otherwise)
@@ -5761,6 +5761,7 @@ def elements_of_norm(self, n, proof=None):
57615761
sage: x in (7/225*a^2 - 7/75*a - 42/25, 28/225*a^2 + 77/75*a - 133/25)
57625762
True
57635763
"""
5764+
n = ZZ(n)
57645765
proof = proof_flag(proof)
57655766
B = self.pari_bnf(proof).bnfisintnorm(n)
57665767
return [self(x, check=False) for x in B]

0 commit comments

Comments
 (0)