Numpy Loop Through Array Python Definition