From 1511ecc67692773f016cc94190785faa33eab2d5 Mon Sep 17 00:00:00 2001 From: "D.J. Sutherland" Date: Wed, 13 May 2020 15:16:21 -0500 Subject: rename I to img in examples, since flake8 complains now (#176) --- examples/domain-adaptation/plot_otda_linear_mapping.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'examples/domain-adaptation/plot_otda_linear_mapping.py') diff --git a/examples/domain-adaptation/plot_otda_linear_mapping.py b/examples/domain-adaptation/plot_otda_linear_mapping.py index dbf16b8..be47510 100644 --- a/examples/domain-adaptation/plot_otda_linear_mapping.py +++ b/examples/domain-adaptation/plot_otda_linear_mapping.py @@ -79,9 +79,9 @@ pl.show() # --------------- -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 -- cgit v1.2.3