Should be able to remove the loop and use numpy broadcasting and sum to replace when summing over the number of gaussian used to approximate the loop
Should be able to remove the loop and use numpy broadcasting and sum to replace when summing over the number of gaussian used to approximate the loop