Skip to content

Commit 94fc518

Browse files
Removed try catch block for a simpler solution. Change suggested by tscrim.
Co-authored-by: Travis Scrimshaw <[email protected]>
1 parent e4793c3 commit 94fc518

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

src/sage/matrix/matrix_integer_dense.pyx

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5448,10 +5448,7 @@ cdef class Matrix_integer_dense(Matrix_dense):
54485448
for i from 0 <= i < index:
54495449
fmpz_init_set(fmpz_mat_entry(res._matrix,i,j), fmpz_mat_entry(self._matrix,i,j))
54505450

5451-
try:
5452-
z = row[j]
5453-
except TypeError:
5454-
z = ZZ(row[j])
5451+
z = ZZ(row[j])
54555452

54565453
fmpz_set_mpz(zflint,z.value)
54575454
fmpz_init_set(fmpz_mat_entry(res._matrix,index,j), zflint)

0 commit comments

Comments
 (0)