When I create np.eye(4,4,4) -- It is creating an array of all zeros. Don't see one's there.
When I create np.eye(3,3,3,3) --- it is giving data type not understood.
Please use np.eye(4, 4) or np.eye(3,3) like syntax with only two inputs. 1st input for the number of rows, 2nd input for the number of columns.
The third input will shift the diagonal by the input value and as a result, you're not seeing it. If you use np.eye(4, 4, 1) then you'll see the use of the third value.
The fourth input does not exist in the np.eye() so it's giving an error when you use np.eye(3,3,3,3). So don't use that.
Comments
0 comments
Article is closed for comments.