diff --git a/PCP.html b/PCP.html index 2f3ba97..45a6c1c 100644 --- a/PCP.html +++ b/PCP.html @@ -13124,7 +13124,7 @@
a = [1, 2, 3] , id(a) = 140332349275344 -b = [0, 2, 3, 4] , id(b) = 140332349275344 -a = [0, 2, 3, 4] , id(a) = 140332349275344 +@@ -13777,7 +13777,7 @@a = [1, 2, 3] , id(a) = 140524003941104 +b = [0, 2, 3, 4] , id(b) = 140524003941104 +a = [0, 2, 3, 4] , id(a) = 140524003941104diff --git a/PCP_02_python.ipynb b/PCP_02_python.ipynb index dbef501..59326de 100644 --- a/PCP_02_python.ipynb +++ b/PCP_02_python.ipynb @@ -779,9 +779,9 @@ "name": "stdout", "output_type": "stream", "text": [ - "a = [1, 2, 3] , id(a) = 140332349275344\n", - "b = [0, 2, 3, 4] , id(b) = 140332349275344\n", - "a = [0, 2, 3, 4] , id(a) = 140332349275344\n" + "a = [1, 2, 3] , id(a) = 140524003941104\n", + "b = [0, 2, 3, 4] , id(b) = 140524003941104\n", + "a = [0, 2, 3, 4] , id(a) = 140524003941104\n" ] } ], diff --git a/PCP_03_numpy.html b/PCP_03_numpy.html index 44b4fcd..ea49b59 100644 --- a/PCP_03_numpy.html +++ b/PCP_03_numpy.html @@ -13301,8 +13301,8 @@NumPy Arrays [1. 1. 1.]] Evenly spaced values within a given interval: [2 4 6] Random values in a given shape: -[[0.13600722 0.08576738 0.0503262 ] - [0.93272723 0.06890308 0.99498775]] +[[0.63882794 0.91877575 0.1844543 ] + [0.17841392 0.86993592 0.63250531]] Identity matrix: [[1. 0. 0.] [0. 1. 0.] @@ -14061,8 +14061,8 @@
Exercises and Results diff --git a/PCP_03_numpy.ipynb b/PCP_03_numpy.ipynb index db2cf5f..e236d7c 100644 --- a/PCP_03_numpy.ipynb +++ b/PCP_03_numpy.ipynb @@ -192,8 +192,8 @@ " [1. 1. 1.]]\n", "Evenly spaced values within a given interval: [2 4 6]\n", "Random values in a given shape: \n", - "[[0.13600722 0.08576738 0.0503262 ]\n", - " [0.93272723 0.06890308 0.99498775]]\n", + "[[0.63882794 0.91877575 0.1844543 ]\n", + " [0.17841392 0.86993592 0.63250531]]\n", "Identity matrix: \n", "[[1. 0. 0.]\n", " [0. 1. 0.]\n", @@ -864,8 +864,8 @@ "[16 15 14 6 5 4 0] Type:
\n", "[16 15 14 6 5 4 0] Type: \n", "[16 15 14 6 5 4 0] Type: \n", - " Type: \n", - " Type: \n" + " Type: \n", + " Type: \n" ] } ], diff --git a/PCP_04_control.html b/PCP_04_control.html index 9e63e60..c66522b 100644 --- a/PCP_04_control.html +++ b/PCP_04_control.html @@ -13685,9 +13685,9 @@ Efficiency and RuntimeComputation with sum_n: n=1000, s=500500 Computation with sum_n_numpy: n=1000, s=500500 Computation with sum_n_math: n=1000, s=500500 -Runtime for sum_n: 0.552015 ms -Runtime for sum_n_numpy: 0.023065 ms -Runtime for sum_n_math: 0.000307 ms +Runtime for sum_n: 0.546106 ms +Runtime for sum_n_numpy: 0.024173 ms +Runtime for sum_n_math: 0.000305 ms
Runtime (ms) for N = 256 : DFT 7.02, FFT 0.00850, FFT_np 0.00000556 -Runtime (ms) for N = 512 : DFT 13.42, FFT 0.01647, FFT_np 0.00000466 -Runtime (ms) for N = 1024 : DFT 45.33, FFT 0.03312, FFT_np 0.00000607 -Runtime (ms) for N = 2048 : DFT 169.02, FFT 0.06671, FFT_np 0.00001244 -Runtime (ms) for N = 4096 : DFT 737.80, FFT 0.13382, FFT_np 0.00001711 +Runtime (ms) for N = 256 : DFT 4.46, FFT 0.00945, FFT_np 0.00000682 +Runtime (ms) for N = 512 : DFT 14.19, FFT 0.01898, FFT_np 0.00000476 +Runtime (ms) for N = 1024 : DFT 45.43, FFT 0.03833, FFT_np 0.00000666 +Runtime (ms) for N = 2048 : DFT 170.61, FFT 0.07642, FFT_np 0.00000926 +Runtime (ms) for N = 4096 : DFT 728.12, FFT 0.15197, FFT_np 0.00001818diff --git a/PCP_09_dft.ipynb b/PCP_09_dft.ipynb index f58ffc9..d4f99eb 100644 --- a/PCP_09_dft.ipynb +++ b/PCP_09_dft.ipynb @@ -717,11 +717,11 @@ "name": "stdout", "output_type": "stream", "text": [ - "Runtime (ms) for N = 256 : DFT 7.02, FFT 0.00850, FFT_np 0.00000556\n", - "Runtime (ms) for N = 512 : DFT 13.42, FFT 0.01647, FFT_np 0.00000466\n", - "Runtime (ms) for N = 1024 : DFT 45.33, FFT 0.03312, FFT_np 0.00000607\n", - "Runtime (ms) for N = 2048 : DFT 169.02, FFT 0.06671, FFT_np 0.00001244\n", - "Runtime (ms) for N = 4096 : DFT 737.80, FFT 0.13382, FFT_np 0.00001711\n" + "Runtime (ms) for N = 256 : DFT 4.46, FFT 0.00945, FFT_np 0.00000682\n", + "Runtime (ms) for N = 512 : DFT 14.19, FFT 0.01898, FFT_np 0.00000476\n", + "Runtime (ms) for N = 1024 : DFT 45.43, FFT 0.03833, FFT_np 0.00000666\n", + "Runtime (ms) for N = 2048 : DFT 170.61, FFT 0.07642, FFT_np 0.00000926\n", + "Runtime (ms) for N = 4096 : DFT 728.12, FFT 0.15197, FFT_np 0.00001818\n" ] } ],