how to compare to row of a matrix a placed them with index of max one in numpy code example Example: numpy find where max element ist result = numpy.where(arr == numpy.amax(arr))