Skip to content

Instantly share code, notes, and snippets.

@IndhumathyChelliah
Created July 18, 2020 04:47
Show Gist options
  • Save IndhumathyChelliah/9054a3b64c7a4628e825d2514019fc90 to your computer and use it in GitHub Desktop.
Save IndhumathyChelliah/9054a3b64c7a4628e825d2514019fc90 to your computer and use it in GitHub Desktop.
import numpy as np
a=np.eye(5,k=1)
print (a)
'''
Output:
[[0. 1. 0. 0. 0.]
[0. 0. 1. 0. 0.]
[0. 0. 0. 1. 0.]
[0. 0. 0. 0. 1.]
[0. 0. 0. 0. 0.]]
'''
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment