From bc4d1c8fcc14b0bb1080e0d2f499d5882fdf4087 Mon Sep 17 00:00:00 2001 From: sebastienwood Date: Thu, 27 Feb 2020 08:20:00 -0500 Subject: [PATCH] Update IFT 6760A - Homework 1 (practical part).ipynb Import of imshow in the preamble for part 3 cells --- IFT 6760A - Homework 1 (practical part).ipynb | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/IFT 6760A - Homework 1 (practical part).ipynb b/IFT 6760A - Homework 1 (practical part).ipynb index c608d17..bf0a945 100644 --- a/IFT 6760A - Homework 1 (practical part).ipynb +++ b/IFT 6760A - Homework 1 (practical part).ipynb @@ -30,7 +30,8 @@ "import pylab as plt\n", "import scipy.sparse.linalg \n", "import PIL.Image\n", - "import tensorly as tl" + "import tensorly as tl\n" + "from pylab import imshow as imshow" ] }, { @@ -927,7 +928,7 @@ "\n", "def plot_compressed(image,method,rank,reshape=None):\n", " compressed_img = compress(image,method,rank,reshape)\n", - " plt.imshow(compressed_img)\n", + " imshow(compressed_img)\n", " plt.title(\"%s (rank: %i - compress ratio: %.4f)\" % (method,rank,compress_ratio(image,method,rank,reshape)))\n", " return compressed_img\n", " \n",