-
-
Notifications
You must be signed in to change notification settings - Fork 487
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
Sort #34892 doctest output vectors to fix randomness #38524
Conversation
By the way, is this intended? sage: L = IntegralLattice(Matrix(QQ, [[1000, 0], [0, 1]]))
....: L.0.norm()
1 |
Documentation preview for this PR (built with commit 4c18be7; changes) is ready! 🎉 |
This is because the given matrix is interpreted as the Gram matrix of the lattice: The basis vectors are always |
Indeed, presumably this is not optimal. The |
Yeah that's what I was thinking, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Your patch (thanks!) will fix the doctest failures, but it also leaves us with tests which basically only check that the method doesn't crash. I'm not sure how to best resolve this. Practically, perhaps we can get away with a sorted()
and deal with it properly if/when it breaks again on some other setup?
If you don't want to use
Why does the second line start with |
Because I copied this from my REPL and it's not a doctest. |
For now, I will add change it to a |
Sorry, I thought you were quoting from the code. |
From CI:
|
I'll sort it by the norm and the original vector then |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, thanks!
…andomness Reported at sagemath#38492 (comment) by @jhpalmieri and @GMS103. Added an extra test because why not. URL: sagemath#38524 Reported by: grhkm21 Reviewer(s): Lorenz Panny
Reported at #38492 (comment) by @jhpalmieri and @GMS103. Added an extra test because why not.