diff --git a/examples/domain-adaptation/plot_otda_color_images.py b/examples/domain-adaptation/plot_otda_color_images.py index 929365ed2..d70f1fc42 100644 --- a/examples/domain-adaptation/plot_otda_color_images.py +++ b/examples/domain-adaptation/plot_otda_color_images.py @@ -27,9 +27,9 @@ r = np.random.RandomState(42) -def im2mat(I): +def im2mat(img): """Converts an image to matrix (one pixel per line)""" - return I.reshape((I.shape[0] * I.shape[1], I.shape[2])) + return img.reshape((img.shape[0] * img.shape[1], img.shape[2])) def mat2im(X, shape): @@ -37,8 +37,8 @@ def mat2im(X, shape): return X.reshape(shape) -def minmax(I): - return np.clip(I, 0, 1) +def minmax(img): + return np.clip(img, 0, 1) ############################################################################## diff --git a/examples/domain-adaptation/plot_otda_linear_mapping.py b/examples/domain-adaptation/plot_otda_linear_mapping.py index dbf16b8f4..be475107c 100644 --- a/examples/domain-adaptation/plot_otda_linear_mapping.py +++ b/examples/domain-adaptation/plot_otda_linear_mapping.py @@ -79,9 +79,9 @@ # --------------- -def im2mat(I): +def im2mat(img): """Converts and image to matrix (one pixel per line)""" - return I.reshape((I.shape[0] * I.shape[1], I.shape[2])) + return img.reshape((img.shape[0] * img.shape[1], img.shape[2])) def mat2im(X, shape): @@ -89,8 +89,8 @@ def mat2im(X, shape): return X.reshape(shape) -def minmax(I): - return np.clip(I, 0, 1) +def minmax(img): + return np.clip(img, 0, 1) # Loading images diff --git a/examples/domain-adaptation/plot_otda_mapping_colors_images.py b/examples/domain-adaptation/plot_otda_mapping_colors_images.py index ee5c8b0f8..aa41d22a3 100644 --- a/examples/domain-adaptation/plot_otda_mapping_colors_images.py +++ b/examples/domain-adaptation/plot_otda_mapping_colors_images.py @@ -29,9 +29,9 @@ r = np.random.RandomState(42) -def im2mat(I): +def im2mat(img): """Converts and image to matrix (one pixel per line)""" - return I.reshape((I.shape[0] * I.shape[1], I.shape[2])) + return img.reshape((img.shape[0] * img.shape[1], img.shape[2])) def mat2im(X, shape): @@ -39,8 +39,8 @@ def mat2im(X, shape): return X.reshape(shape) -def minmax(I): - return np.clip(I, 0, 1) +def minmax(img): + return np.clip(img, 0, 1) ############################################################################## diff --git a/examples/gromov/plot_gromov_barycenter.py b/examples/gromov/plot_gromov_barycenter.py index f6f031a74..e2d88baf3 100755 --- a/examples/gromov/plot_gromov_barycenter.py +++ b/examples/gromov/plot_gromov_barycenter.py @@ -84,9 +84,9 @@ def smacof_mds(C, dim, max_iter=3000, eps=1e-9): # The four distributions are constructed from 4 simple images -def im2mat(I): +def im2mat(img): """Converts and image to matrix (one pixel per line)""" - return I.reshape((I.shape[0] * I.shape[1], I.shape[2])) + return img.reshape((img.shape[0] * img.shape[1], img.shape[2])) square = pl.imread('../../data/square.png').astype(np.float64)[:, :, 2] diff --git a/setup.py b/setup.py index 91c24d911..9fb1afb7b 100755 --- a/setup.py +++ b/setup.py @@ -66,9 +66,8 @@ license='MIT', scripts=[], data_files=[], - requires=["numpy", "scipy", "cython"], - setup_requires=["numpy>=1.16", "scipy>=1.0", "cython>=0.23"], - install_requires=["numpy>=1.16", "scipy>=1.0", "cython>=0.23"], + setup_requires=["numpy>=1.16", "cython>=0.23"], + install_requires=["numpy>=1.16", "scipy>=1.0"], classifiers=[ 'Development Status :: 5 - Production/Stable', 'Intended Audience :: Developers',