Answers for "np.eye(5)[list]"

0

np.eye(5)[list]

>>np.eye(3)
array([[ 1.,  0.,  0.],
   [ 0.,  1.,  0.],
   [ 0.,  0.,  1.]])
>>> np.eye(3)[1]
array([ 0.,  1.,  0.])
Posted by: Guest on May-26-2020

Python Answers by Framework

Browse Popular Code Answers by Language