I have such an array:
x = np.array([[1,2], [3,4], [5,6]])
I want to find elements bigger than 3. I am trying:
ppoc = np.zeros((3,3))
ixu = np.argwhere(x > 2)
ppoc = ppoc[0, ixu]
But the problem is ppoc is a 2*2 array, but I need to return an array with the same size as x, which the rest of the elements are zero.
ppoc must look like:
ppoc = [[0,0], [3,4], [5,6]]
Does anyone have an idea how to do that?