You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a project to compute different p-norm Wasserstein distances. I assume the function ot.dist(p = pnorm) is used to compute different p-norm cost matrices, which are referred to as "Minkowski distances" in the docstring. However, the following example shows that it does not follow what I expected.
import ot
import numpy as np
A = np.array([[0,0]])
B = np.array([[1,2]])
print(ot.dist(A,B,p = 1))
print(ot.dist(A,B,p = 2))
print(ot.dist(A,B,p = 3))
print(ot.dist(A,B,p = 4))
print(ot.dist(A,B,p = 5))
print(ot.dist(A,B,p = 6))
And the outputs are
[[5]]
[[5]]
[[5]]
[[5]]
[[5]]
[[5]]
Please let me know if there is any other function that can compute the p-norm function, as well as the 'inf'-norm case.
Activity