Euclidean distance with weights
The suggestion of writing your own weighted L2 norm is a good one, but the calculation provided in this answer is incorrect. If the intention is to calculate
then this should do the job:
def weightedL2(a,b,w):
q = a-b
return np.sqrt((w*q*q).sum())