|
104 | 104 | # the License, or (at your option) any later version.
|
105 | 105 | # https://www.gnu.org/licenses/
|
106 | 106 | # ****************************************************************************
|
107 |
| - |
| 107 | +from __future__ import annotations |
108 | 108 | from sage.misc.cachefunc import cached_method
|
109 | 109 | from sage.misc.superseded import (deprecation,
|
110 | 110 | deprecated_function_alias)
|
@@ -5726,13 +5726,13 @@ def trace_dual_basis(self, b):
|
5726 | 5726 | raise ValueError('Not a basis of the number field.')
|
5727 | 5727 | return [sum([v[i]*b[i] for i in range(len(b))]) for v in M.inverse()]
|
5728 | 5728 |
|
5729 |
| - def elements_of_norm(self, n, proof=None): |
| 5729 | + def elements_of_norm(self, n, proof=None) -> list: |
5730 | 5730 | """
|
5731 |
| - Return a list of elements of norm ``n``. |
| 5731 | + Return a list of elements of norm `n`. |
5732 | 5732 |
|
5733 | 5733 | INPUT:
|
5734 | 5734 |
|
5735 |
| - - ``n`` -- integer in this number field |
| 5735 | + - `n` -- integer |
5736 | 5736 |
|
5737 | 5737 | - ``proof`` -- boolean (default: ``True``, unless you called
|
5738 | 5738 | :meth:`proof.number_field` and set it otherwise)
|
@@ -5761,6 +5761,7 @@ def elements_of_norm(self, n, proof=None):
|
5761 | 5761 | sage: x in (7/225*a^2 - 7/75*a - 42/25, 28/225*a^2 + 77/75*a - 133/25)
|
5762 | 5762 | True
|
5763 | 5763 | """
|
| 5764 | + n = ZZ(n) |
5764 | 5765 | proof = proof_flag(proof)
|
5765 | 5766 | B = self.pari_bnf(proof).bnfisintnorm(n)
|
5766 | 5767 | return [self(x, check=False) for x in B]
|
|
0 commit comments