You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
defadd_multiple_of_row(self, Py_ssize_t i, Py_ssize_t j, s, Py_ssize_t start_col=0):
2915
+
defadd_multiple_of_row(self, Py_ssize_t i, Py_ssize_t j, s, Py_ssize_t start_col=0):
2916
2916
"""
2917
2917
Add s times row j to row i.
2918
2918
@@ -2943,19 +2943,19 @@ cdef class Matrix(sage.structure.element.Matrix):
2943
2943
TypeError: Multiplying row by Symbolic Ring element cannot be done over
2944
2944
Rational Field, use change_ring or with_added_multiple_of_row instead.
2945
2945
"""
2946
-
self.check_row_bounds_and_mutability(i,j)
2946
+
self.check_row_bounds_and_mutability(i,j)
2947
2947
try:
2948
2948
s =self._coerce_element(s)
2949
2949
self.add_multiple_of_row_c(i, j, s, start_col)
2950
2950
exceptTypeError:
2951
2951
raiseTypeError('Multiplying row by %s element cannot be done over %s, use change_ring or with_added_multiple_of_row instead.'% (s.parent(), self.base_ring()))
2952
2952
2953
-
cdef add_multiple_of_row_c(self, Py_ssize_t i, Py_ssize_t j, s, Py_ssize_t start_col) noexcept:
2953
+
cdef add_multiple_of_row_c(self, Py_ssize_t i, Py_ssize_t j, s, Py_ssize_t start_col) noexcept:
2954
2954
cdef Py_ssize_t c
2955
2955
for c from start_col <= c <self._ncols:
2956
2956
self.set_unsafe(i, c, self.get_unsafe(i, c) + s*self.get_unsafe(j, c))
2957
2957
2958
-
defwith_added_multiple_of_row(self, Py_ssize_t i, Py_ssize_t j, s, Py_ssize_t start_col=0):
2958
+
defwith_added_multiple_of_row(self, Py_ssize_t i, Py_ssize_t j, s, Py_ssize_t start_col=0):
2959
2959
"""
2960
2960
Add s times row j to row i, returning new matrix.
2961
2961
@@ -2983,7 +2983,7 @@ cdef class Matrix(sage.structure.element.Matrix):
2983
2983
[ 3 4 5]
2984
2984
"""
2985
2985
cdef Matrix temp
2986
-
self.check_row_bounds_and_mutability(i,j)
2986
+
self.check_row_bounds_and_mutability(i,j)
2987
2987
try:
2988
2988
s =self._coerce_element(s)
2989
2989
temp =self.__copy__()
@@ -3028,7 +3028,7 @@ cdef class Matrix(sage.structure.element.Matrix):
3028
3028
TypeError: Multiplying column by Symbolic Ring element cannot be done over
3029
3029
Rational Field, use change_ring or with_added_multiple_of_column instead.
3030
3030
"""
3031
-
self.check_column_bounds_and_mutability(i,j)
3031
+
self.check_column_bounds_and_mutability(i,j)
3032
3032
try:
3033
3033
s =self._coerce_element(s)
3034
3034
self.add_multiple_of_column_c(i, j, s, start_row)
@@ -3040,7 +3040,7 @@ cdef class Matrix(sage.structure.element.Matrix):
3040
3040
for r from start_row <= r <self._nrows:
3041
3041
self.set_unsafe(r, i, self.get_unsafe(r, i) + s*self.get_unsafe(r, j))
3042
3042
3043
-
defwith_added_multiple_of_column(self, Py_ssize_t i, Py_ssize_t j, s, Py_ssize_t start_row=0):
3043
+
defwith_added_multiple_of_column(self, Py_ssize_t i, Py_ssize_t j, s, Py_ssize_t start_row=0):
3044
3044
"""
3045
3045
Add s times column j to column i, returning new matrix.
3046
3046
@@ -3068,7 +3068,7 @@ cdef class Matrix(sage.structure.element.Matrix):
3068
3068
[13/3 4 5]
3069
3069
"""
3070
3070
cdef Matrix temp
3071
-
self.check_column_bounds_and_mutability(i,j)
3071
+
self.check_column_bounds_and_mutability(i,j)
3072
3072
try:
3073
3073
s =self._coerce_element(s)
3074
3074
temp =self.__copy__()
@@ -3335,7 +3335,7 @@ cdef class Matrix(sage.structure.element.Matrix):
3335
3335
...
3336
3336
TypeError: Multiplying row by Rational Field element cannot be done over Integer Ring, use change_ring or with_row_set_to_multiple_of_row instead.
3337
3337
"""
3338
-
self.check_row_bounds_and_mutability(i,j)
3338
+
self.check_row_bounds_and_mutability(i,j)
3339
3339
cdef Py_ssize_t n
3340
3340
try:
3341
3341
s =self._coerce_element(s)
@@ -3370,7 +3370,7 @@ cdef class Matrix(sage.structure.element.Matrix):
3370
3370
[ 0 1 2]
3371
3371
[ 0 1/2 1]
3372
3372
"""
3373
-
self.check_row_bounds_and_mutability(i,j)
3373
+
self.check_row_bounds_and_mutability(i,j)
3374
3374
cdef Matrix temp
3375
3375
cdef Py_ssize_t n
3376
3376
try:
@@ -3413,7 +3413,7 @@ cdef class Matrix(sage.structure.element.Matrix):
3413
3413
...
3414
3414
TypeError: Multiplying column by Rational Field element cannot be done over Integer Ring, use change_ring or with_col_set_to_multiple_of_col instead.
3415
3415
"""
3416
-
self.check_column_bounds_and_mutability(i,j)
3416
+
self.check_column_bounds_and_mutability(i,j)
3417
3417
cdef Py_ssize_t n
3418
3418
try:
3419
3419
s =self._coerce_element(s)
@@ -3453,7 +3453,7 @@ cdef class Matrix(sage.structure.element.Matrix):
3453
3453
[ 0 0 2]
3454
3454
[ 3 3/2 5]
3455
3455
"""
3456
-
self.check_column_bounds_and_mutability(i,j)
3456
+
self.check_column_bounds_and_mutability(i,j)
3457
3457
cdef Py_ssize_t n
3458
3458
cdef Matrix temp
3459
3459
try:
@@ -3706,7 +3706,7 @@ cdef class Matrix(sage.structure.element.Matrix):
3706
3706
if positive andnot d[i] >0:
3707
3707
returnFalse
3708
3708
for j in d:
3709
-
if d[i] *self.get_unsafe(i,j) != sign * d[j] *self.get_unsafe(j,i):
3709
+
if d[i] *self.get_unsafe(i,j) != sign * d[j] *self.get_unsafe(j,i):
3710
3710
returnFalse
3711
3711
return L
3712
3712
@@ -3959,11 +3959,11 @@ cdef class Matrix(sage.structure.element.Matrix):
3959
3959
ifself._ncols !=self._nrows: returnFalse
3960
3960
# could be bigger than an int on a 64-bit platform, this
3961
3961
# is the type used for indexing.
3962
-
cdef Py_ssize_t i,j
3962
+
cdef Py_ssize_t i,j
3963
3963
3964
3964
for i from0<= i <self._nrows:
3965
3965
for j from0<= j < i:
3966
-
ifself.get_unsafe(i,j) !=self.get_unsafe(j,i):
3966
+
ifself.get_unsafe(i,j) !=self.get_unsafe(j,i):
3967
3967
returnFalse
3968
3968
returnTrue
3969
3969
@@ -4072,7 +4072,7 @@ cdef class Matrix(sage.structure.element.Matrix):
4072
4072
4073
4073
tolerance =self.base_ring()(tolerance)
4074
4074
cdef bint tolerance_is_zero = tolerance.is_zero()
4075
-
cdef Py_ssize_t i,j
4075
+
cdef Py_ssize_t i,j
4076
4076
4077
4077
ifself.is_sparse_c():
4078
4078
# The dense algorithm checks all of the on-or-below-diagonal
@@ -4086,12 +4086,12 @@ cdef class Matrix(sage.structure.element.Matrix):
4086
4086
# copy, so it's important that we don't modify it.
0 commit comments