New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Inaccurate documentation for number field elements_of_norm #32860
Comments
This comment has been minimized.
This comment has been minimized.
Author: Frédéric Chapoton |
New commits:
|
Commit: |
Branch: u/chapoton/32860 |
comment:3
here is a minimal branch |
comment:4
Thanks. I report things and then simply forget. I'm not familiar with the syntax --> list in the function header. Is that a new python thing? |
comment:5
This is a "type annotation". This means that it is a declaration stating that the output is a list. This kind of annotation (optional) has been introduced in recent versions of python. It allows some tools (mypy) to check consistency inside the code. Also useful for refined tab completions, in principle. The lights are green, so the branch is ready for review. |
Reviewer: John Cremona |
Changed branch from u/chapoton/32860 to |
For a number field
K
and an integern
,the function
K.elements_of_norm(n)
returnsa list of integral elements of
K
with normn
,up to multiplication by units of positive norm.
The docstring says that
n
should be an "integerin this number field", which is wrong (and makes
no sense): it must be a rational integer.
If you give the function something else (e.g. a
non-integral rational or an element of
K
(evenK(0)
), aPariError
is raised, and it would bebetter for Sage to check the input, say by trying
n = ZZ(n)
first.CC: @slel
Component: number fields
Keywords: number field norm
Author: Frédéric Chapoton
Branch/Commit:
59e2efa
Reviewer: John Cremona
Issue created by migration from https://trac.sagemath.org/ticket/32860
The text was updated successfully, but these errors were encountered: