title: Reference for wasserstein distance function in python
body: <p>We are trying to calculate the distance between two discrete 1-d distributions. Our purpose is to compute a distance function that follows the intuition of optimal transport:
  Our distributions are masses at "points", i.e vectors, with importance to the order of elements in each vector. Given a matrix that describes the distances between any two points, we would like to find the minimal-cost transport in u, in order to make it v. </p>
  
  <p>The simplest example is: Let u,v be the distributions: <strong>u=(0.5,0.2,0.3), v=(0.5,0.3,0.2)</strong></p>
  
  <p>Assume that the <strong>distances matrix is [[1,1,1],[1,1,1],[1,1,1]]</strong>, which means it costs 1 to move unit of mass between any two points. obviously, the optimal way to make u look like v is to transport 0.1 from the third point to the second point. The cost in that case will be 1*0.1 which is 0.1.  </p>
  
  <p>Following this intuition we turned to the Wasserstein distance.
  We have tried both <strong>scipy.stats.wasserstein_1d</strong> and the <strong>POT</strong> package - in particular ot.emd2.
  However, none really computes what we want, regarding the example above, the first doesn't consider the order of elements in the vector, so the result is 0. The second algorithm returns 1</p>
  
  <p>We would really appreciate any explanation we might have missed regarding to the operation of this two python functions, or any other references or suggestions. </p>
  
  <ul>
  <li>We are aware to the fact that given a non symmetric distance metric this notion of "distance" won't be symmetric. </li>
  </ul>