sorry..the last post didn't appear! > Are you sure? What happens if the vector with the smallest > sum(distance) is the first one? >
initially i will set imgindex =0 so if the first one is of smallest sum..,the image will be reteived by imgindex 0 > (a) Can't you replace the inner loop with something like this: > distance = abs(input_weight - weights[image, :]) good suggestion ..was doing it java way! > (b) I doubt that you need the .copy() > 5. Lose the hard-wired numbers like 30 and 100 those nums were only for clarification.. > 6. Put it inside a function and *TEST* it > will do... thanx john ,your post really helped gordon -- http://mail.python.org/mailman/listinfo/python-list