Middle, just added npy
Use numpy for numerical calcs for speedup