Skip to content

Commit 4972c0d

Browse files
fchapotontscrim
andauthored
Update src/sage/quadratic_forms/quadratic_form.py
Co-authored-by: Travis Scrimshaw <[email protected]>
1 parent 82973bc commit 4972c0d

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

src/sage/quadratic_forms/quadratic_form.py

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -579,11 +579,7 @@ def __init__(self, R, n=None, entries=None, unsafe_initialization=False, number_
579579
elif is_Polynomial(R) or is_MPolynomial(R):
580580
p = R
581581

582-
if p.is_zero():
583-
pass
584-
elif p.is_homogeneous() and p.degree() == 2:
585-
pass
586-
else:
582+
if not p.is_zero() and not (p.is_homogeneous() and p.degree() == 2):
587583
raise ValueError("polynomial is neither zero nor homogeneous of degree 2")
588584

589585
P = p.parent()

0 commit comments

Comments
 (0)