At @5:00 why not use vectorisation

while calculating W why didn’t we do something like

temp = np.exp((-1*(X - query_point)2)/(2(tau*2))
and update W[i,i] = temp[i] using a for loop

because it will save time for processing and only updation will take less time i think…