Hello,
Here under a question that has probably already been
asked:
I would like to apply the find() function on a bidimensional
array and receive as output the bidimensional indices for the elements matching
the condition. This is easy in Matlab but doesn’t seem to be possible with
Python.
Here is a short example (in Matlab code) of what I
would like to have:
z=rand(3,3)
z =
0.9501
0.4860 0.4565
0.2311
0.8913 0.0185
0.6068
0.7621 0.8214
[i,j]=find(z<0.5)
i =
2
1
1
2
j =
1
2
3
3
A solution for me?
Thank you,
Dimitri D’Or