From 36bf7c03cb25bfd09f13e92adcd5dee66acda7e7 Mon Sep 17 00:00:00 2001 From: hyejeonglee Date: Mon, 13 Oct 2025 14:53:35 +0200 Subject: [PATCH 1/2] initial commit --- your-code/main.ipynb | 690 +++++++++++++++++++++++++++++++++++++++---- 1 file changed, 628 insertions(+), 62 deletions(-) diff --git a/your-code/main.ipynb b/your-code/main.ipynb index 46f5aa14..c0521ef0 100644 --- a/your-code/main.ipynb +++ b/your-code/main.ipynb @@ -16,11 +16,11 @@ }, { "cell_type": "code", - "execution_count": 19, + "execution_count": 92, "metadata": {}, "outputs": [], "source": [ - "### [your code here]\n" + "import numpy as np\n" ] }, { @@ -34,11 +34,106 @@ }, { "cell_type": "code", - "execution_count": 20, + "execution_count": 32, "metadata": {}, - "outputs": [], + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "2.1.3\n" + ] + } + ], "source": [ - "### [your code here]\n" + "print(np.__version__)\n" + ] + }, + { + "cell_type": "code", + "execution_count": 33, + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Build Dependencies:\n", + " blas:\n", + " detection method: pkgconfig\n", + " found: true\n", + " include directory: C:/Users/SAMSUNG/anaconda3/Library/include\n", + " lib directory: C:/Users/SAMSUNG/anaconda3/Library/lib\n", + " name: mkl-sdl\n", + " openblas configuration: unknown\n", + " pc file directory: C:\\b\\abs_25aj347ekn\\croot\\numpy_and_numpy_base_1730835595898\\_h_env\\Library\\lib\\pkgconfig\n", + " version: '2023.1'\n", + " lapack:\n", + " detection method: pkgconfig\n", + " found: true\n", + " include directory: C:/Users/SAMSUNG/anaconda3/Library/include\n", + " lib directory: C:/Users/SAMSUNG/anaconda3/Library/lib\n", + " name: mkl-sdl\n", + " openblas configuration: unknown\n", + " pc file directory: C:\\b\\abs_25aj347ekn\\croot\\numpy_and_numpy_base_1730835595898\\_h_env\\Library\\lib\\pkgconfig\n", + " version: '2023.1'\n", + "Compilers:\n", + " c:\n", + " commands: cl.exe\n", + " linker: link\n", + " name: msvc\n", + " version: 19.29.30156\n", + " c++:\n", + " commands: cl.exe\n", + " linker: link\n", + " name: msvc\n", + " version: 19.29.30156\n", + " cython:\n", + " commands: cython\n", + " linker: cython\n", + " name: cython\n", + " version: 3.0.11\n", + "Machine Information:\n", + " build:\n", + " cpu: x86_64\n", + " endian: little\n", + " family: x86_64\n", + " system: windows\n", + " host:\n", + " cpu: x86_64\n", + " endian: little\n", + " family: x86_64\n", + " system: windows\n", + "Python Information:\n", + " path: C:\\b\\abs_25aj347ekn\\croot\\numpy_and_numpy_base_1730835595898\\_h_env\\python.exe\n", + " version: '3.13'\n", + "SIMD Extensions:\n", + " baseline:\n", + " - SSE\n", + " - SSE2\n", + " - SSE3\n", + " found:\n", + " - SSSE3\n", + " - SSE41\n", + " - POPCNT\n", + " - SSE42\n", + " - AVX\n", + " - F16C\n", + " - FMA3\n", + " - AVX2\n", + " not found:\n", + " - AVX512F\n", + " - AVX512CD\n", + " - AVX512_SKX\n", + " - AVX512_CLX\n", + " - AVX512_CNL\n", + " - AVX512_ICL\n", + "\n" + ] + } + ], + "source": [ + "np.show_config()" ] }, { @@ -51,11 +146,29 @@ }, { "cell_type": "code", - "execution_count": 21, + "execution_count": 93, + "metadata": {}, + "outputs": [], + "source": [ + "a=np.random.randint(10, size=(2,3,5))" + ] + }, + { + "cell_type": "code", + "execution_count": 8, "metadata": {}, "outputs": [], "source": [ - "### [your code here]\n" + "a=np.random.random((2,3,5))\n" + ] + }, + { + "cell_type": "code", + "execution_count": 35, + "metadata": {}, + "outputs": [], + "source": [ + "a=np.ones((2,3,5))" ] }, { @@ -68,11 +181,25 @@ }, { "cell_type": "code", - "execution_count": 22, + "execution_count": 94, "metadata": {}, - "outputs": [], + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "[[[4 3 5 7 1]\n", + " [2 9 8 9 9]\n", + " [3 4 1 6 0]]\n", + "\n", + " [[5 2 2 2 2]\n", + " [9 7 6 3 9]\n", + " [3 9 8 3 7]]]\n" + ] + } + ], "source": [ - "### [your code here]\n" + "print(a)\n" ] }, { @@ -85,11 +212,11 @@ }, { "cell_type": "code", - "execution_count": 23, + "execution_count": 95, "metadata": {}, "outputs": [], "source": [ - "### [your code here]\n" + "b=np.ones((5,2,3))\n" ] }, { @@ -102,11 +229,32 @@ }, { "cell_type": "code", - "execution_count": 24, - "metadata": {}, - "outputs": [], - "source": [ - "### [your code here]\n" + "execution_count": 96, + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "[[[1. 1. 1.]\n", + " [1. 1. 1.]]\n", + "\n", + " [[1. 1. 1.]\n", + " [1. 1. 1.]]\n", + "\n", + " [[1. 1. 1.]\n", + " [1. 1. 1.]]\n", + "\n", + " [[1. 1. 1.]\n", + " [1. 1. 1.]]\n", + "\n", + " [[1. 1. 1.]\n", + " [1. 1. 1.]]]\n" + ] + } + ], + "source": [ + "print(b)\n" ] }, { @@ -119,11 +267,52 @@ }, { "cell_type": "code", - "execution_count": 25, + "execution_count": 53, "metadata": {}, "outputs": [], "source": [ - "### [your code here]\n" + "def array_info(arr):\n", + " print(\"dimension:\", arr.ndim)\n", + " print(\"shape:\", arr.shape)\n", + " print(\"size:\", arr.size)\n" + ] + }, + { + "cell_type": "code", + "execution_count": 40, + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "dimension: 3\n", + "shape: (2, 3, 5)\n", + "size: 30\n" + ] + } + ], + "source": [ + "array_info(a)" + ] + }, + { + "cell_type": "code", + "execution_count": 41, + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "dimension: 3\n", + "shape: (5, 2, 3)\n", + "size: 30\n" + ] + } + ], + "source": [ + "array_info(b)" ] }, { @@ -136,11 +325,24 @@ }, { "cell_type": "code", - "execution_count": 26, + "execution_count": 54, "metadata": {}, - "outputs": [], + "outputs": [ + { + "ename": "ValueError", + "evalue": "operands could not be broadcast together with shapes (2,3,5) (5,2,3) ", + "output_type": "error", + "traceback": [ + "\u001b[1;31m---------------------------------------------------------------------------\u001b[0m", + "\u001b[1;31mValueError\u001b[0m Traceback (most recent call last)", + "Cell \u001b[1;32mIn[54], line 1\u001b[0m\n\u001b[1;32m----> 1\u001b[0m c\u001b[38;5;241m=\u001b[39ma\u001b[38;5;241m+\u001b[39mb\n", + "\u001b[1;31mValueError\u001b[0m: operands could not be broadcast together with shapes (2,3,5) (5,2,3) " + ] + } + ], "source": [ - "### [your code here]\n" + "c=a+b\n", + "#No,since there are different shapes\n" ] }, { @@ -154,11 +356,28 @@ }, { "cell_type": "code", - "execution_count": 27, - "metadata": {}, - "outputs": [], - "source": [ - "### [your code here]\n" + "execution_count": 97, + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "[[[1. 1. 1. 1. 1.]\n", + " [1. 1. 1. 1. 1.]\n", + " [1. 1. 1. 1. 1.]]\n", + "\n", + " [[1. 1. 1. 1. 1.]\n", + " [1. 1. 1. 1. 1.]\n", + " [1. 1. 1. 1. 1.]]]\n" + ] + } + ], + "source": [ + "c=np.reshape(b, (2,3,5))\n", + "print(c)\n", + "\n", + "\n" ] }, { @@ -171,11 +390,12 @@ }, { "cell_type": "code", - "execution_count": 28, + "execution_count": 98, "metadata": {}, "outputs": [], "source": [ - "### [your code here]\n" + "d=a+c\n", + "#yes it works since it has same shape\n" ] }, { @@ -188,12 +408,58 @@ }, { "cell_type": "code", - "execution_count": 29, + "execution_count": 99, + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "[[[4 3 5 7 1]\n", + " [2 9 8 9 9]\n", + " [3 4 1 6 0]]\n", + "\n", + " [[5 2 2 2 2]\n", + " [9 7 6 3 9]\n", + " [3 9 8 3 7]]]\n" + ] + } + ], + "source": [ + "print(a)\n", + "\n" + ] + }, + { + "cell_type": "code", + "execution_count": 100, + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "[[[ 5. 4. 6. 8. 2.]\n", + " [ 3. 10. 9. 10. 10.]\n", + " [ 4. 5. 2. 7. 1.]]\n", + "\n", + " [[ 6. 3. 3. 3. 3.]\n", + " [10. 8. 7. 4. 10.]\n", + " [ 4. 10. 9. 4. 8.]]]\n" + ] + } + ], + "source": [ + "print(d)" + ] + }, + { + "cell_type": "code", + "execution_count": null, "metadata": {}, "outputs": [], "source": [ - "### [your code here]\n", - "\n" + "#The value of the d array is the sum of the values in a and c" ] }, { @@ -206,11 +472,26 @@ }, { "cell_type": "code", - "execution_count": 30, + "execution_count": 101, "metadata": {}, - "outputs": [], + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "[[[4. 3. 5. 7. 1.]\n", + " [2. 9. 8. 9. 9.]\n", + " [3. 4. 1. 6. 0.]]\n", + "\n", + " [[5. 2. 2. 2. 2.]\n", + " [9. 7. 6. 3. 9.]\n", + " [3. 9. 8. 3. 7.]]]\n" + ] + } + ], "source": [ - "### [your code here]\n" + "e=a * c\n", + "print(e)\n" ] }, { @@ -224,12 +505,31 @@ }, { "cell_type": "code", - "execution_count": 31, - "metadata": {}, - "outputs": [], - "source": [ - "### [your code here]\n", - "\n" + "execution_count": 102, + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "e and a are equaul?\n", + "[[[ True True True True True]\n", + " [ True True True True True]\n", + " [ True True True True True]]\n", + "\n", + " [[ True True True True True]\n", + " [ True True True True True]\n", + " [ True True True True True]]]\n" + ] + } + ], + "source": [ + "equal_result = (a == e)\n", + "print(\"e and a are equaul?\")\n", + "print(equal_result)\n", + "\n", + "\n", + "#The value of the e array are multiplication of a and c array, where the values of the c are 1.Thus the value of the e array are equla to the one in a array. \n" ] }, { @@ -243,11 +543,35 @@ }, { "cell_type": "code", - "execution_count": 32, - "metadata": {}, - "outputs": [], - "source": [ - "### [your code here]\n", + "execution_count": 103, + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "[[[ 5. 4. 6. 8. 2.]\n", + " [ 3. 10. 9. 10. 10.]\n", + " [ 4. 5. 2. 7. 1.]]\n", + "\n", + " [[ 6. 3. 3. 3. 3.]\n", + " [10. 8. 7. 4. 10.]\n", + " [ 4. 10. 9. 4. 8.]]]\n", + "The max value in d array: 10.0\n", + "The min value in d array: 1.0\n", + "The mean of the values in d array: 5.933333333333334\n" + ] + } + ], + "source": [ + "print(d)\n", + "d_max=np.max(d)\n", + "d_min=np.min(d)\n", + "d_mean=np.mean(d)\n", + "\n", + "print(\"The max value in d array:\", d_max)\n", + "print(\"The min value in d array:\", d_min)\n", + "print(\"The mean of the values in d array:\", d_mean)\n", "\n" ] }, @@ -261,11 +585,26 @@ }, { "cell_type": "code", - "execution_count": 33, + "execution_count": 104, "metadata": {}, - "outputs": [], + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "[[[ 5. 4. 6. 8. 2.]\n", + " [ 3. 10. 9. 10. 10.]\n", + " [ 4. 5. 2. 7. 1.]]\n", + "\n", + " [[ 6. 3. 3. 3. 3.]\n", + " [10. 8. 7. 4. 10.]\n", + " [ 4. 10. 9. 4. 8.]]]\n" + ] + } + ], "source": [ - "### [your code here]\n" + "f=np.empty((2,3,5))\n", + "print(f)" ] }, { @@ -287,13 +626,151 @@ }, { "cell_type": "code", - "execution_count": 34, + "execution_count": 105, "metadata": {}, - "outputs": [], + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "[[[ 5. 4. 6. 8. 2.]\n", + " [ 3. 10. 9. 10. 10.]\n", + " [ 4. 5. 2. 7. 1.]]\n", + "\n", + " [[ 6. 3. 3. 3. 3.]\n", + " [10. 8. 7. 4. 10.]\n", + " [ 4. 10. 9. 4. 8.]]]\n" + ] + } + ], + "source": [ + "print(f)" + ] + }, + { + "cell_type": "code", + "execution_count": 76, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "2" + ] + }, + "execution_count": 76, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "len(f)" + ] + }, + { + "cell_type": "code", + "execution_count": 77, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "3" + ] + }, + "execution_count": 77, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "len(f[0])" + ] + }, + { + "cell_type": "code", + "execution_count": 80, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "5" + ] + }, + "execution_count": 80, + "metadata": {}, + "output_type": "execute_result" + } + ], "source": [ - "### [your code here]\n" + "len(f[0][0])" ] }, + { + "cell_type": "code", + "execution_count": 91, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "np.float64(9.0)" + ] + }, + "execution_count": 91, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "f[0][0][1]" + ] + }, + { + "cell_type": "code", + "execution_count": 106, + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "[[[ 25. 25. 75. 75. 25.]\n", + " [ 25. 100. 75. 100. 100.]\n", + " [ 25. 25. 25. 75. 0.]]\n", + "\n", + " [[ 75. 25. 25. 25. 25.]\n", + " [100. 75. 75. 25. 100.]\n", + " [ 25. 100. 75. 25. 75.]]]\n" + ] + } + ], + "source": [ + "for i in range(len(d)):\n", + " for j in range(len(d[0])):\n", + " for h in range(len(d[0][0])):\n", + " if d[i][j][h] == d_min:\n", + " f[i][j][h] =0\n", + " elif d[i][j][h] == d_max:\n", + " f[i][j][h] =100\n", + " elif d[i][j][h] == d_mean:\n", + " f[i][j][h] =50\n", + " elif d_min < d[i][j][h] < d_mean:\n", + " f[i][j][h] =25\n", + " elif d_mean < d[i][j][h] < d_max:\n", + " f[i][j][h] =75\n", + "print(f)\n", + " " + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [] + }, { "cell_type": "markdown", "metadata": {}, @@ -325,11 +802,48 @@ }, { "cell_type": "code", - "execution_count": 35, + "execution_count": 107, "metadata": {}, - "outputs": [], + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "[[[ 5. 4. 6. 8. 2.]\n", + " [ 3. 10. 9. 10. 10.]\n", + " [ 4. 5. 2. 7. 1.]]\n", + "\n", + " [[ 6. 3. 3. 3. 3.]\n", + " [10. 8. 7. 4. 10.]\n", + " [ 4. 10. 9. 4. 8.]]]\n" + ] + } + ], + "source": [ + "print(d)\n" + ] + }, + { + "cell_type": "code", + "execution_count": 108, + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "[[[ 25. 25. 75. 75. 25.]\n", + " [ 25. 100. 75. 100. 100.]\n", + " [ 25. 25. 25. 75. 0.]]\n", + "\n", + " [[ 75. 25. 25. 25. 25.]\n", + " [100. 75. 75. 25. 100.]\n", + " [ 25. 100. 75. 25. 75.]]]\n" + ] + } + ], "source": [ - "### [your code here]\n" + "print(f)" ] }, { @@ -350,17 +864,69 @@ }, { "cell_type": "code", - "execution_count": 36, - "metadata": {}, - "outputs": [], - "source": [ - "### [your code here]" + "execution_count": null, + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "[[['' '' '' '' '']\n", + " ['' '' '' '' '']\n", + " ['' '' '' '' '']]\n", + "\n", + " [['' '' '' '' '']\n", + " ['' '' '' '' '']\n", + " ['' '' '' '' '']]]\n" + ] + } + ], + "source": [ + "#creating g array with data type \"string\"\n", + "g=np.empty((2,3,5), dtype=str)\n", + "print(g)" + ] + }, + { + "cell_type": "code", + "execution_count": 110, + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "[[['B' 'B' 'D' 'D' 'B']\n", + " ['B' 'E' 'D' 'E' 'E']\n", + " ['B' 'B' 'B' 'D' 'A']]\n", + "\n", + " [['D' 'B' 'B' 'B' 'B']\n", + " ['E' 'D' 'D' 'B' 'E']\n", + " ['B' 'E' 'D' 'B' 'D']]]\n" + ] + } + ], + "source": [ + "for i in range(len(d)):\n", + " for j in range(len(d[0])):\n", + " for h in range(len(d[0][0])):\n", + " if d[i][j][h] == d_min:\n", + " g[i][j][h] = \"A\"\n", + " elif d[i][j][h] == d_max:\n", + " g[i][j][h] = \"E\"\n", + " elif d[i][j][h] == d_mean:\n", + " g[i][j][h] = \"C\"\n", + " elif d_min < d[i][j][h] < d_mean:\n", + " g[i][j][h] = \"B\"\n", + " elif d_mean < d[i][j][h] < d_max:\n", + " g[i][j][h] = \"D\"\n", + "print(g)" ] } ], "metadata": { "kernelspec": { - "display_name": "Python 3", + "display_name": "base", "language": "python", "name": "python3" }, @@ -374,7 +940,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.8.0" + "version": "3.13.5" } }, "nbformat": 4, From bacdbdf3b3724a7b659c7d674ee95f2b70c82912 Mon Sep 17 00:00:00 2001 From: hyejeonglee Date: Mon, 13 Oct 2025 16:26:28 +0200 Subject: [PATCH 2/2] updated --- your-code/main.ipynb | 184 +++++++++++++++++++++---------------------- 1 file changed, 91 insertions(+), 93 deletions(-) diff --git a/your-code/main.ipynb b/your-code/main.ipynb index c0521ef0..45475ba8 100644 --- a/your-code/main.ipynb +++ b/your-code/main.ipynb @@ -16,7 +16,7 @@ }, { "cell_type": "code", - "execution_count": 92, + "execution_count": 11, "metadata": {}, "outputs": [], "source": [ @@ -146,7 +146,7 @@ }, { "cell_type": "code", - "execution_count": 93, + "execution_count": 12, "metadata": {}, "outputs": [], "source": [ @@ -181,20 +181,20 @@ }, { "cell_type": "code", - "execution_count": 94, + "execution_count": 13, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ - "[[[4 3 5 7 1]\n", - " [2 9 8 9 9]\n", - " [3 4 1 6 0]]\n", + "[[[0 5 4 0 8]\n", + " [4 2 5 0 2]\n", + " [6 2 3 7 2]]\n", "\n", - " [[5 2 2 2 2]\n", - " [9 7 6 3 9]\n", - " [3 9 8 3 7]]]\n" + " [[0 8 4 6 5]\n", + " [2 5 5 8 4]\n", + " [6 0 7 1 9]]]\n" ] } ], @@ -212,7 +212,7 @@ }, { "cell_type": "code", - "execution_count": 95, + "execution_count": 14, "metadata": {}, "outputs": [], "source": [ @@ -229,7 +229,7 @@ }, { "cell_type": "code", - "execution_count": 96, + "execution_count": 15, "metadata": {}, "outputs": [ { @@ -267,7 +267,7 @@ }, { "cell_type": "code", - "execution_count": 53, + "execution_count": 7, "metadata": {}, "outputs": [], "source": [ @@ -279,7 +279,7 @@ }, { "cell_type": "code", - "execution_count": 40, + "execution_count": 16, "metadata": {}, "outputs": [ { @@ -298,7 +298,7 @@ }, { "cell_type": "code", - "execution_count": 41, + "execution_count": 17, "metadata": {}, "outputs": [ { @@ -356,7 +356,7 @@ }, { "cell_type": "code", - "execution_count": 97, + "execution_count": 19, "metadata": {}, "outputs": [ { @@ -374,10 +374,8 @@ } ], "source": [ - "c=np.reshape(b, (2,3,5))\n", - "print(c)\n", - "\n", - "\n" + "c=b.transpose(1,2,0)\n", + "print(c)\n" ] }, { @@ -390,7 +388,7 @@ }, { "cell_type": "code", - "execution_count": 98, + "execution_count": 20, "metadata": {}, "outputs": [], "source": [ @@ -408,20 +406,20 @@ }, { "cell_type": "code", - "execution_count": 99, + "execution_count": 21, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ - "[[[4 3 5 7 1]\n", - " [2 9 8 9 9]\n", - " [3 4 1 6 0]]\n", + "[[[0 5 4 0 8]\n", + " [4 2 5 0 2]\n", + " [6 2 3 7 2]]\n", "\n", - " [[5 2 2 2 2]\n", - " [9 7 6 3 9]\n", - " [3 9 8 3 7]]]\n" + " [[0 8 4 6 5]\n", + " [2 5 5 8 4]\n", + " [6 0 7 1 9]]]\n" ] } ], @@ -432,20 +430,20 @@ }, { "cell_type": "code", - "execution_count": 100, + "execution_count": 22, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ - "[[[ 5. 4. 6. 8. 2.]\n", - " [ 3. 10. 9. 10. 10.]\n", - " [ 4. 5. 2. 7. 1.]]\n", + "[[[ 1. 6. 5. 1. 9.]\n", + " [ 5. 3. 6. 1. 3.]\n", + " [ 7. 3. 4. 8. 3.]]\n", "\n", - " [[ 6. 3. 3. 3. 3.]\n", - " [10. 8. 7. 4. 10.]\n", - " [ 4. 10. 9. 4. 8.]]]\n" + " [[ 1. 9. 5. 7. 6.]\n", + " [ 3. 6. 6. 9. 5.]\n", + " [ 7. 1. 8. 2. 10.]]]\n" ] } ], @@ -472,20 +470,20 @@ }, { "cell_type": "code", - "execution_count": 101, + "execution_count": 23, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ - "[[[4. 3. 5. 7. 1.]\n", - " [2. 9. 8. 9. 9.]\n", - " [3. 4. 1. 6. 0.]]\n", + "[[[0. 5. 4. 0. 8.]\n", + " [4. 2. 5. 0. 2.]\n", + " [6. 2. 3. 7. 2.]]\n", "\n", - " [[5. 2. 2. 2. 2.]\n", - " [9. 7. 6. 3. 9.]\n", - " [3. 9. 8. 3. 7.]]]\n" + " [[0. 8. 4. 6. 5.]\n", + " [2. 5. 5. 8. 4.]\n", + " [6. 0. 7. 1. 9.]]]\n" ] } ], @@ -505,7 +503,7 @@ }, { "cell_type": "code", - "execution_count": 102, + "execution_count": 24, "metadata": {}, "outputs": [ { @@ -543,23 +541,23 @@ }, { "cell_type": "code", - "execution_count": 103, + "execution_count": 25, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ - "[[[ 5. 4. 6. 8. 2.]\n", - " [ 3. 10. 9. 10. 10.]\n", - " [ 4. 5. 2. 7. 1.]]\n", + "[[[ 1. 6. 5. 1. 9.]\n", + " [ 5. 3. 6. 1. 3.]\n", + " [ 7. 3. 4. 8. 3.]]\n", "\n", - " [[ 6. 3. 3. 3. 3.]\n", - " [10. 8. 7. 4. 10.]\n", - " [ 4. 10. 9. 4. 8.]]]\n", + " [[ 1. 9. 5. 7. 6.]\n", + " [ 3. 6. 6. 9. 5.]\n", + " [ 7. 1. 8. 2. 10.]]]\n", "The max value in d array: 10.0\n", "The min value in d array: 1.0\n", - "The mean of the values in d array: 5.933333333333334\n" + "The mean of the values in d array: 5.0\n" ] } ], @@ -585,20 +583,20 @@ }, { "cell_type": "code", - "execution_count": 104, + "execution_count": 26, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ - "[[[ 5. 4. 6. 8. 2.]\n", - " [ 3. 10. 9. 10. 10.]\n", - " [ 4. 5. 2. 7. 1.]]\n", + "[[[ 1. 6. 5. 1. 9.]\n", + " [ 5. 3. 6. 1. 3.]\n", + " [ 7. 3. 4. 8. 3.]]\n", "\n", - " [[ 6. 3. 3. 3. 3.]\n", - " [10. 8. 7. 4. 10.]\n", - " [ 4. 10. 9. 4. 8.]]]\n" + " [[ 1. 9. 5. 7. 6.]\n", + " [ 3. 6. 6. 9. 5.]\n", + " [ 7. 1. 8. 2. 10.]]]\n" ] } ], @@ -626,20 +624,20 @@ }, { "cell_type": "code", - "execution_count": 105, + "execution_count": 27, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ - "[[[ 5. 4. 6. 8. 2.]\n", - " [ 3. 10. 9. 10. 10.]\n", - " [ 4. 5. 2. 7. 1.]]\n", + "[[[ 1. 6. 5. 1. 9.]\n", + " [ 5. 3. 6. 1. 3.]\n", + " [ 7. 3. 4. 8. 3.]]\n", "\n", - " [[ 6. 3. 3. 3. 3.]\n", - " [10. 8. 7. 4. 10.]\n", - " [ 4. 10. 9. 4. 8.]]]\n" + " [[ 1. 9. 5. 7. 6.]\n", + " [ 3. 6. 6. 9. 5.]\n", + " [ 7. 1. 8. 2. 10.]]]\n" ] } ], @@ -729,20 +727,20 @@ }, { "cell_type": "code", - "execution_count": 106, + "execution_count": 29, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ - "[[[ 25. 25. 75. 75. 25.]\n", - " [ 25. 100. 75. 100. 100.]\n", - " [ 25. 25. 25. 75. 0.]]\n", + "[[[ 0. 75. 50. 0. 75.]\n", + " [ 50. 25. 75. 0. 25.]\n", + " [ 75. 25. 25. 75. 25.]]\n", "\n", - " [[ 75. 25. 25. 25. 25.]\n", - " [100. 75. 75. 25. 100.]\n", - " [ 25. 100. 75. 25. 75.]]]\n" + " [[ 0. 75. 50. 75. 75.]\n", + " [ 25. 75. 75. 75. 50.]\n", + " [ 75. 0. 75. 25. 100.]]]\n" ] } ], @@ -802,20 +800,20 @@ }, { "cell_type": "code", - "execution_count": 107, + "execution_count": 30, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ - "[[[ 5. 4. 6. 8. 2.]\n", - " [ 3. 10. 9. 10. 10.]\n", - " [ 4. 5. 2. 7. 1.]]\n", + "[[[ 1. 6. 5. 1. 9.]\n", + " [ 5. 3. 6. 1. 3.]\n", + " [ 7. 3. 4. 8. 3.]]\n", "\n", - " [[ 6. 3. 3. 3. 3.]\n", - " [10. 8. 7. 4. 10.]\n", - " [ 4. 10. 9. 4. 8.]]]\n" + " [[ 1. 9. 5. 7. 6.]\n", + " [ 3. 6. 6. 9. 5.]\n", + " [ 7. 1. 8. 2. 10.]]]\n" ] } ], @@ -825,20 +823,20 @@ }, { "cell_type": "code", - "execution_count": 108, + "execution_count": 31, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ - "[[[ 25. 25. 75. 75. 25.]\n", - " [ 25. 100. 75. 100. 100.]\n", - " [ 25. 25. 25. 75. 0.]]\n", + "[[[ 0. 75. 50. 0. 75.]\n", + " [ 50. 25. 75. 0. 25.]\n", + " [ 75. 25. 25. 75. 25.]]\n", "\n", - " [[ 75. 25. 25. 25. 25.]\n", - " [100. 75. 75. 25. 100.]\n", - " [ 25. 100. 75. 25. 75.]]]\n" + " [[ 0. 75. 50. 75. 75.]\n", + " [ 25. 75. 75. 75. 50.]\n", + " [ 75. 0. 75. 25. 100.]]]\n" ] } ], @@ -864,7 +862,7 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 32, "metadata": {}, "outputs": [ { @@ -889,20 +887,20 @@ }, { "cell_type": "code", - "execution_count": 110, + "execution_count": 33, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ - "[[['B' 'B' 'D' 'D' 'B']\n", - " ['B' 'E' 'D' 'E' 'E']\n", - " ['B' 'B' 'B' 'D' 'A']]\n", + "[[['A' 'D' 'C' 'A' 'D']\n", + " ['C' 'B' 'D' 'A' 'B']\n", + " ['D' 'B' 'B' 'D' 'B']]\n", "\n", - " [['D' 'B' 'B' 'B' 'B']\n", - " ['E' 'D' 'D' 'B' 'E']\n", - " ['B' 'E' 'D' 'B' 'D']]]\n" + " [['A' 'D' 'C' 'D' 'D']\n", + " ['B' 'D' 'D' 'D' 'C']\n", + " ['D' 'A' 'D' 'B' 'E']]]\n" ] } ],