Skip to content

Instantly share code, notes, and snippets.

@MeherajUlMahmmud
Last active May 2, 2021 12:58
Show Gist options
  • Save MeherajUlMahmmud/e159d36c03438006c487401d10803cdc to your computer and use it in GitHub Desktop.
Save MeherajUlMahmmud/e159d36c03438006c487401d10803cdc to your computer and use it in GitHub Desktop.
def identity(n):
mat = zeros(n, n)
for i in range(n):
mat[i][i] = 1
return mat
mat = identity(3)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment