added simple python loop method
added numpy vectorized method, seperated loop method into a loop function and a pi-scaling function