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
some cleanup in quadratic forms #27726
Comments
Branch: u/chapoton/27726 |
Commit: |
New commits:
|
comment:2
green bot, please review |
Reviewer: Travis Scrimshaw |
comment:3
I am not quite in favor of these changes: -#from sage.quadratic_forms.quadratic_form import QuadraticForm ## This creates a circular import! =(
-####################################################################################
-## Routines used for understanding p-neighbors, and computing classes in a genus. ##
-####################################################################################
+# ######################################################################
+# Routines used for understanding p-neighbors and computing classes in a genus.
+# ###################################################################### The first one deserves to be there as a warning for future code. For the latter, the first looks better visually IMO. However, that one is clearly bikeshedding, so I won't push it. - ## Find a (dual) vector w with B(v,w) != 0 (mod p)
- v_dual = B2 * vector(v) ## We want the dot product with this to not be divisible by 2*p.
+ # Find a (dual) vector w with B(v,w) != 0 (mod p)
+ v_dual = B2 * vector(v)
+ # We want the dot product with this to not be divisible by 2*p. For this change, I feel the comment is better served before the if hasattr(self, "__split_local_cover"):
if is_QuadraticForm(self.__split_local_cover): ## Here the computation has been done.
return self.__split_local_cover
- elif isinstance(self.__split_local_cover, Integer): ## Here it indexes the values already tried!
+ elif self.__split_local_cover in ZZ: ## Here it indexes the values already tried!
current_length = self.__split_local_cover + 1
Length_Max = current_length + 5
else: I am slightly worried about this change as |
comment:4
grepping Thanks for the cleanup. |
Branch pushed to git repo; I updated commit sha1. New commits:
|
comment:6
some fixes as suggested |
comment:7
Thanks. LGTM. |
Changed branch from u/chapoton/27726 to |
some pyflakes, pep, and code cleanup in just a few files there
CC: @tscrim @simonbrandhorst
Component: quadratic forms
Author: Frédéric Chapoton
Branch/Commit:
c0fc402
Reviewer: Travis Scrimshaw
Issue created by migration from https://trac.sagemath.org/ticket/27726
The text was updated successfully, but these errors were encountered: