diff options
author | Rémi Flamary <remi.flamary@gmail.com> | 2017-08-30 20:57:52 +0200 |
---|---|---|
committer | Rémi Flamary <remi.flamary@gmail.com> | 2017-08-30 20:57:52 +0200 |
commit | ec67362de5ec785e3871eac75a8aa477857092c4 (patch) | |
tree | c27fcdeff594f41d97d64e21f0fa0270997914e1 /examples | |
parent | ac1d169902ed1720f81512194a703812abbab246 (diff) |
pep8
Diffstat (limited to 'examples')
-rw-r--r-- | examples/plot_OT_1D.py | 2 | ||||
-rw-r--r-- | examples/plot_optim_OTreg.py | 5 |
2 files changed, 4 insertions, 3 deletions
diff --git a/examples/plot_OT_1D.py b/examples/plot_OT_1D.py index be6f5b3..77114c4 100644 --- a/examples/plot_OT_1D.py +++ b/examples/plot_OT_1D.py @@ -52,7 +52,7 @@ pl.figure(2, figsize=(5, 5)) ot.plot.plot1D_mat(a, b, M, 'Cost matrix M') ############################################################################## -# Solve EMD +# Solve EMD ############################################################################## #%% EMD diff --git a/examples/plot_optim_OTreg.py b/examples/plot_optim_OTreg.py index d36b269..7ef6a6b 100644 --- a/examples/plot_optim_OTreg.py +++ b/examples/plot_optim_OTreg.py @@ -13,7 +13,7 @@ import ot ############################################################################## -# Generate data +# Generate data ############################################################################## #%% parameters @@ -32,7 +32,7 @@ M = ot.dist(x.reshape((n, 1)), x.reshape((n, 1))) M /= M.max() ############################################################################## -# Solve EMD +# Solve EMD ############################################################################## #%% EMD @@ -92,6 +92,7 @@ ot.plot.plot1D_mat(a, b, Ge, 'OT matrix Entrop. reg') #%% Example with Frobenius norm + entropic regularization with gcg + def f(G): return 0.5 * np.sum(G**2) |