[MRG] Only Minkowski metrics can be used for emd_1d by rtavenar · Pull Request #670 · PythonOT/POT

Types of changes

The point here is to prevent anyone from using the emd_1d and emd2_1d functions with metrics that are not Minkowski ones, since this implementation is valid only in this case.

As such, I have left the opportunity to use 'sqeuclidean', 'minkowski', 'cityblock', or 'euclidean' as metrics. Another option would be to remove the metrics keyword and only specify p, but that would break backward compatibility, so I assumed this change was better for maintenance purposes. Let me know if this should be changed.

Motivation and context / Related issue

This PR aims at solving issue #669.

How has this been tested (if it applies)

Not tested yet.

PR checklist

  • I have read the CONTRIBUTING document.
  • The documentation is up-to-date with the changes I made (check build artifacts).
  • All tests passed, and additional code has been covered with new tests.
  • I have added the PR and Issue fix to the RELEASES.md file.