From 399e0e859ca7874bd068bc3667e86c8410ca7b53 Mon Sep 17 00:00:00 2001 From: melissawm Date: Mon, 3 Oct 2022 16:33:03 -0300 Subject: DOC, MAINT: Remove unused files These files should be deleted, as they were used on the SVD Tutorial which is now hosted at numpy/numpy-tutorials. [skip azp][skip travis] --- doc/source/user/plot_final.py | 19 ------------------- 1 file changed, 19 deletions(-) delete mode 100644 doc/source/user/plot_final.py (limited to 'doc/source/user/plot_final.py') diff --git a/doc/source/user/plot_final.py b/doc/source/user/plot_final.py deleted file mode 100644 index 10cb097dd..000000000 --- a/doc/source/user/plot_final.py +++ /dev/null @@ -1,19 +0,0 @@ -from scipy import misc -import matplotlib.pyplot as plt -import numpy as np -from numpy import linalg - -img = misc.face() -img_array = img / 255 -img_array_transposed = np.transpose(img_array, (2, 0, 1)) - -U, s, Vt = linalg.svd(img_array_transposed) - -Sigma = np.zeros((3, 768, 1024)) -for j in range(3): - np.fill_diagonal(Sigma[j, :, :], s[j, :]) - -k = 10 - -approx_img = U @ Sigma[..., :k] @ Vt[..., :k, :] -plt.imshow(np.transpose(approx_img, (1, 2, 0))) -- cgit v1.2.1