Skip to content

Commit d5efa20

Browse files
committed
read image using pylab
1 parent 1ea47b7 commit d5efa20

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

examples/plot_gromov_barycenter.py

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@
1717
import numpy as np
1818
import scipy as sp
1919

20-
import scipy.ndimage as spi
2120
import matplotlib.pylab as pl
2221
from sklearn import manifold
2322
from sklearn.decomposition import PCA
@@ -90,10 +89,10 @@ def im2mat(I):
9089
return I.reshape((I.shape[0] * I.shape[1], I.shape[2]))
9190

9291

93-
square = spi.imread('../data/square.png').astype(np.float64)[:, :, 2] / 256
94-
cross = spi.imread('../data/cross.png').astype(np.float64)[:, :, 2] / 256
95-
triangle = spi.imread('../data/triangle.png').astype(np.float64)[:, :, 2] / 256
96-
star = spi.imread('../data/star.png').astype(np.float64)[:, :, 2] / 256
92+
square = pl.imread('../data/square.png').astype(np.float64)[:, :, 2] / 256
93+
cross = pl.imread('../data/cross.png').astype(np.float64)[:, :, 2] / 256
94+
triangle = pl.imread('../data/triangle.png').astype(np.float64)[:, :, 2] / 256
95+
star = pl.imread('../data/star.png').astype(np.float64)[:, :, 2] / 256
9796

9897
shapes = [square, cross, triangle, star]
9998

0 commit comments

Comments
 (0)