I've written a gist, trying to compare scipy.stats.wasserstein_distance with the EMDLoss implemented here. Unfortunately it seems like I'm using the implementation in a wrong way, because the values differ for the following test signals:

| (x, y) |
EL |
WD |
| (a, b) |
0.04349525 |
0.0 |
| (a, c) |
0.46960036 |
0.12115367548619291 |
| (b, c) |
0.89565078 |
0.12115367548619291 |
Shouldn't EMDLoss and SciPy's Wasserstein Distance actually take on the same values? Am I wrong about the conversion of the signals through signal[None, :, None]? I tried mimicking the shapes from test_emd_loss.py, but don't quite grasp how this can be transferred to 1D signals.
Thanks
I've written a gist, trying to compare
scipy.stats.wasserstein_distancewith theEMDLossimplemented here. Unfortunately it seems like I'm using the implementation in a wrong way, because the values differ for the following test signals:Shouldn't EMDLoss and SciPy's Wasserstein Distance actually take on the same values? Am I wrong about the conversion of the signals through
signal[None, :, None]? I tried mimicking the shapes fromtest_emd_loss.py, but don't quite grasp how this can be transferred to 1D signals.Thanks