Skip to content

Commit ba08a90

Browse files
Update EyeandIdentity.py
Code changed as per suggestion. Update date added.
1 parent 5a12770 commit ba08a90

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

Numpy/EyeandIdentity.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,11 @@
44
Domain : Python
55
Author : Ahmedur Rahman Shovon
66
Created : 15 July 2016
7+
Updated : 17 March 2021
78
Problem : https://www.hackerrank.com/challenges/np-eye-and-identity/problem
89
'''
9-
import numpy as np
10-
np.set_printoptions(sign=' ')
11-
print(np.eye(*map(int, input().split())))
10+
import numpy as p
11+
np.set_printoptions(legacy='1.13')
12+
n, m = map(int, input().split())
13+
print(np.eye(n, m, k=0))
1214

0 commit comments

Comments
 (0)