We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f3bcb78 commit ae2fca6Copy full SHA for ae2fca6
src/sage/matrix/matrix_space.py
@@ -1805,7 +1805,6 @@ def identity_matrix(self):
1805
if self.__nrows != self.__ncols:
1806
raise TypeError("identity matrix must be square")
1807
A = self.zero_matrix().__copy__()
1808
-
1809
for i in range(self.__nrows):
1810
A[i, i] = 1
1811
A.set_immutable()
@@ -1865,7 +1864,6 @@ def diagonal_matrix(self, entries):
1865
1864
if self.__nrows < len(entries):
1866
raise ValueError('number of diagonal matrix entries (%s) exceeds the matrix size (%s)' % (len(entries), self.__nrows))
1867
1868
1869
for i in range(len(entries)):
1870
A[i, i] = entries[i]
1871
return A
0 commit comments