Accessing One Dimensional Numpy Array using while Loop in Python