bug 676: notes on maxloc algorithm, add python version for clarity