> > 1. 'temp' is not used > 2. Lose the superfluous parentheses in 'if' statements > 3. Put space around operators > 4. I've never used any of numpy & friends, but: > (a) Can't you replace the inner loop with something like this: > distance = abs(input_weight - weights[image, :]) > (b) I doubt that you need the .copy() > 5. Lose the hard-wired numbers like 30 and 100 > 6. Put it inside a function and *TEST* it >
thanx John , will go thru those and do the cleanup gordon -- http://mail.python.org/mailman/listinfo/python-list