What does this peace of python code
row = R[i,]
j = numpy.nonzero(row == max(row))[0][0]
do, assuming this output:
command # output of python
----------------------------------
R.shape # (224, 24)
type(R) # <type 'numpy.ndarray'>
type(row) # <type 'numpy.ndarray'>
type(j) # <type 'numpy.int64'>
(I’ll provide more information if required, to answer my question.)
Update:
Sorry, I used two times the variable i. I changed that in the question!
Perhaps an example will help:
Thus the
jis the index of the maximum element in theith row ofR. So