https://medium.com/@monocosmo77/working-with-optimal-transport-maps-part2-advanced-computation-74f766484433