From 8d47d32713a6e2d448fae6db7420e93b4395d5e6 Mon Sep 17 00:00:00 2001 From: Romain Tavenard Date: Tue, 2 Jul 2019 09:44:02 +0200 Subject: Bugfix (python2 in unbalanced) --- ot/unbalanced.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'ot/unbalanced.py') diff --git a/ot/unbalanced.py b/ot/unbalanced.py index 4a2af8a..44ab411 100644 --- a/ot/unbalanced.py +++ b/ot/unbalanced.py @@ -6,6 +6,7 @@ Regularized Unbalanced OT # Author: Hicham Janati # License: MIT License +from __future__ import division import warnings import numpy as np # from .utils import unif, dist @@ -287,12 +288,12 @@ def sinkhorn_knopp_unbalanced(a, b, M, reg, alpha, numItermax=1000, -------- >>> import ot - >>> a=[.5, .15] + >>> a=[.5, .5] >>> b=[.5, .5] >>> M=[[0., 1.],[1., 0.]] >>> ot.unbalanced.sinkhorn_knopp_unbalanced(a, b, M, 1., 1.) - array([[0.52761554, 0.22392482], - [0.10286295, 0.32257641]]) + array([[0.51122823, 0.18807035], + [0.18807035, 0.51122823]]) References ---------- -- cgit v1.2.3