Rectangle 27 0

This will give you the index of the largest element in matrix F.

ind = np.unravel_index(np.argmax(F),F.shape)

This will give you the row number of the largest element in column j.

max_row_in_col_j = np.argmax(F[:,j])

This will give you the column number of the largest element in row i.

max_col_in_row_i = np.argmax(F[i,:])

python - Numpy.argmax() on certain axis in 2D matrix - Stack Overflow

python numpy matrix flatten argmax