September Morn Update
This commit is contained in:
parent
4e2d22a71d
commit
aac6731f2c
6856 changed files with 141342 additions and 21127 deletions
|
|
@ -1 +1,11 @@
|
|||
np.mat(np.eye(size))
|
||||
>>> def identity(size):
|
||||
... return {(x, y):int(x == y) for x in range(size) for y in range(size)}
|
||||
...
|
||||
>>> size = 4
|
||||
>>> matrix = identity(size)
|
||||
>>> print('\n'.join(' '.join(str(matrix[(x, y)]) for x in range(size)) for y in range(size)))
|
||||
1 0 0 0
|
||||
0 1 0 0
|
||||
0 0 1 0
|
||||
0 0 0 1
|
||||
>>>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue