Skip to content

Commit f080ec7

Browse files
committed
Add partial_wasserstein2 function and export
Introduces the partial_wasserstein2 function in lib.jl, wrapping the corresponding PythonOT method, and exports it in PythonOT.jl for external use.
1 parent 90877fa commit f080ec7

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

src/PythonOT.jl

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,8 @@ export emd,
1414
sinkhorn_unbalanced2,
1515
empirical_sinkhorn_divergence,
1616
mm_unbalanced,
17-
entropic_partial_wasserstein
17+
entropic_partial_wasserstein,
18+
partial_wasserstein2
1819

1920
const pot = PyCall.PyNULL()
2021

src/lib.jl

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -586,3 +586,7 @@ julia> round.(entropic_partial_wasserstein(a, b, M, 1, m=0.1), digits=2)
586586
function entropic_partial_wasserstein(a, b, M, reg; kwargs...)
587587
return pot.partial.entropic_partial_wasserstein(a, b, M, reg; kwargs...)
588588
end
589+
590+
function partial_wasserstein2(a, b, M; kwargs...)
591+
return pot.partial.partial_wasserstein2(a, b, M; kwargs...)
592+
end

0 commit comments

Comments
 (0)