diff options
author | D.J. Sutherland <djs@djsutherland.ml> | 2020-05-13 15:16:21 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-05-13 22:16:21 +0200 |
commit | 1511ecc67692773f016cc94190785faa33eab2d5 (patch) | |
tree | 1a394bd357cc71e2c139507a49de213b414ce075 /examples/domain-adaptation/plot_otda_color_images.py | |
parent | 02adb61543bd92158bc2a3193e3c98fd026a6804 (diff) |
rename I to img in examples, since flake8 complains now (#176)
Diffstat (limited to 'examples/domain-adaptation/plot_otda_color_images.py')
-rw-r--r-- | examples/domain-adaptation/plot_otda_color_images.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/examples/domain-adaptation/plot_otda_color_images.py b/examples/domain-adaptation/plot_otda_color_images.py index 929365e..d70f1fc 100644 --- a/examples/domain-adaptation/plot_otda_color_images.py +++ b/examples/domain-adaptation/plot_otda_color_images.py @@ -27,9 +27,9 @@ import ot 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) ############################################################################## |