summaryrefslogtreecommitdiff
path: root/examples/plot_OT_2D_samples.py
diff options
context:
space:
mode:
authorRémi Flamary <remi.flamary@gmail.com>2018-05-30 09:58:51 +0200
committerRémi Flamary <remi.flamary@gmail.com>2018-05-30 09:58:51 +0200
commitb5e45bbc83fd8cd8c1634a78f2f983d1cf28af73 (patch)
tree965b01f0313ff5ac2c2013239adda48f767ba992 /examples/plot_OT_2D_samples.py
parent90e42f32bdf0dd06667edaf172c51f4d4fce2c8b (diff)
update examples and notebooks
Diffstat (limited to 'examples/plot_OT_2D_samples.py')
-rw-r--r--examples/plot_OT_2D_samples.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/examples/plot_OT_2D_samples.py b/examples/plot_OT_2D_samples.py
index 9818ec5..bb952a0 100644
--- a/examples/plot_OT_2D_samples.py
+++ b/examples/plot_OT_2D_samples.py
@@ -16,6 +16,7 @@ sum of diracs. The OT matrix is plotted with the samples.
import numpy as np
import matplotlib.pylab as pl
import ot
+import ot.plot
##############################################################################
# Generate data
@@ -31,8 +32,8 @@ cov_s = np.array([[1, 0], [0, 1]])
mu_t = np.array([4, 4])
cov_t = np.array([[1, -.8], [-.8, 1]])
-xs = ot.datasets.get_2D_samples_gauss(n, mu_s, cov_s)
-xt = ot.datasets.get_2D_samples_gauss(n, mu_t, cov_t)
+xs = ot.datasets.make_2D_samples_gauss(n, mu_s, cov_s)
+xt = ot.datasets.make_2D_samples_gauss(n, mu_t, cov_t)
a, b = np.ones((n,)) / n, np.ones((n,)) / n # uniform distribution on samples