On Mar 17, 6:17 pm, "Gabriel Genellina" <gagsl-... at yahoo.com.ar> wrote > > _, imgindex = min((sum(abs(input_wk - weights[image, :])),image) for image > in xrange(numimgs)) > mindistance = abs(input_wk - weights[imgindex, :]) > # normalize and sum again thanks Gabriel D