Révision 96 pobysoPythonSage/src/sageSLZ/sageMatrixOperations.sage
sageMatrixOperations.sage (revision 96) | ||
---|---|---|
110 | 110 |
varListArrayDeclaration += "]" |
111 | 111 |
return(varDeclarationString, varListArrayDeclaration) |
112 | 112 |
# End smo_transformation_row_matrix_strings. |
113 |
|
|
114 |
def smo_zero_rows_index_list(matrix): |
|
115 |
""" |
|
116 |
Compute the list of indices of the rows that have a 0 norm. |
|
117 |
""" |
|
118 |
if numRows == matrix.nrows(): |
|
119 |
return [] |
|
120 |
zeroRowsList = [] |
|
121 |
rowIndex = 0 |
|
122 |
for row in matrix.rows(): |
|
123 |
if row.norm(p=1) == 0 : |
|
124 |
zeroRowsList.append(rowIndex) |
|
125 |
rowIndex += 1() |
|
126 |
return zeroRowsList |
|
127 |
|
|
128 |
# End smo_zero_rows_index_list |
|
113 | 129 |
|
114 | 130 |
print "\t...sageMatrixOperations loaded" |
Formats disponibles : Unified diff