The formula is ||u-v||_2 (note this has a square root included) and the weights being 1 in all dimensions. Please note that you have a ^2 in your formula. And the second one (in the documentation) with a w implies ‘if the weights are specified’. Hope this makes sense.