Skip to content
This repository has been archived by the owner on Jan 30, 2023. It is now read-only.

Commit

Permalink
Move zero/one inside check
Browse files Browse the repository at this point in the history
  • Loading branch information
trevorkarn committed Sep 13, 2022
1 parent c55f72e commit 252eafd
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/sage/combinat/diagram.py
Original file line number Diff line number Diff line change
Expand Up @@ -483,10 +483,9 @@ def from_zero_one_matrix(self, M, check=True):
# check matrix is zero-one
n_rows, n_cols = M.dimensions()

zero = M.base_ring().zero()
one = M.base_ring().one()

if check:
zero = M.base_ring().zero()
one = M.base_ring().one()
for i in range(n_rows):
for j in range(n_cols):
if not (M[i,j] == zero or M[i,j] == one):
Expand Down

0 comments on commit 252eafd

Please sign in to comment.