Skip to content

Commit 602b67e

Browse files
committed
Removed python int to long cast raising error for large integers
1 parent dc99dc8 commit 602b67e

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

src/sage/matrix/matrix_modn_dense_template.pxi

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -525,10 +525,7 @@ cdef class Matrix_modn_dense_template(Matrix_dense):
525525
se = <SparseEntry>t
526526
x = se.entry
527527
v = self._matrix[se.i]
528-
if type(x) is int:
529-
tmp = (<long>x) % p
530-
v[se.j] = tmp + (tmp<0)*p
531-
elif type(x) is IntegerMod_int and (<IntegerMod_int>x)._parent is R:
528+
if type(x) is IntegerMod_int and (<IntegerMod_int>x)._parent is R:
532529
v[se.j] = <celement>(<IntegerMod_int>x).ivalue
533530
elif type(x) is Integer:
534531
if coerce:

0 commit comments

Comments
 (0)