Sync
This commit is contained in:
parent
6f050a029e
commit
776bba907c
3887 changed files with 59894 additions and 7280 deletions
|
|
@ -1,5 +1,6 @@
|
|||
def identity(size):
|
||||
matrix = [[0] * size] * size
|
||||
matrix = [[0]*size for i in range(size)]
|
||||
#matrix = [[0] * size] * size #Has a flaw. See http://stackoverflow.com/questions/240178/unexpected-feature-in-a-python-list-of-lists
|
||||
|
||||
for i in range(size):
|
||||
matrix[i][i] = 1
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue