I was writing code in Matlab and had to return a matrix which gave a 0 or 1 to represent elements in the original matrix.
I wanted to know if there is a python equivalent of the above without running nested loops to achieve the same result.
c = [2; 1; 3]
temp = eye(3,3)
d = temp(c,:)
the d matrix needs to tell me what number was present in my original matrix. i = 1, j = 2 if 1 tells me the first element of the original matrix was 2