{"id":43841,"date":"2025-08-05T15:15:06","date_gmt":"2025-08-05T06:15:06","guid":{"rendered":"https:\/\/techgym.jp\/?p=43841"},"modified":"2025-08-05T15:15:08","modified_gmt":"2025-08-05T06:15:08","slug":"python-numpy-ndarray","status":"publish","type":"post","link":"https:\/\/techgym.jp\/column\/python-numpy-ndarray\/","title":{"rendered":"Python\u30ea\u30b9\u30c8\u30fb\u914d\u5217\u30fbnumpy.ndarray\u306e\u9055\u3044\u5b8c\u5168\u89e3\u8aac\uff1a\u7279\u5fb4\u3068\u4f7f\u3044\u5206\u3051\u30ac\u30a4\u30c9"},"content":{"rendered":"\n<p>\u00a0<\/p>\n<h2>\u306f\u3058\u3081\u306b<\/h2>\n<p>Python\u3067\u30c7\u30fc\u30bf\u3092\u6271\u3046\u969b\u3001\u300c\u30ea\u30b9\u30c8\u300d\u300c\u914d\u5217\u300d\u300cnumpy.ndarray\u300d\u3068\u3044\u30463\u3064\u306e\u6982\u5ff5\u304c\u3042\u308a\u3001\u521d\u5fc3\u8005\u306b\u3068\u3063\u3066\u6df7\u4e71\u3057\u3084\u3059\u3044\u30dd\u30a4\u30f3\u30c8\u3067\u3059\u3002\u305d\u308c\u305e\u308c\u7570\u306a\u308b\u7279\u5fb4\u3068\u7528\u9014\u304c\u3042\u308b\u305f\u3081\u3001\u9069\u5207\u306b\u4f7f\u3044\u5206\u3051\u308b\u3053\u3068\u3067\u52b9\u7387\u7684\u306a\u30d7\u30ed\u30b0\u30e9\u30df\u30f3\u30b0\u304c\u53ef\u80fd\u306b\u306a\u308a\u307e\u3059\u3002\u3053\u306e\u8a18\u4e8b\u3067\u306f\u3001\u3053\u308c\u3089\u306e\u9055\u3044\u3092\u8a73\u3057\u304f\u89e3\u8aac\u3057\u3001\u5b9f\u8df5\u7684\u306a\u4f7f\u3044\u5206\u3051\u65b9\u6cd5\u3092\u7d39\u4ecb\u3057\u307e\u3059\u3002<\/p>\n<h2>1. Python\u30ea\u30b9\u30c8\uff08list\uff09<\/h2>\n<h3>\u57fa\u672c\u7684\u306a\u7279\u5fb4<\/h3>\n<p>Python\u306e\u7d44\u307f\u8fbc\u307f\u30c7\u30fc\u30bf\u578b\u3067\u3001\u6700\u3082\u57fa\u672c\u7684\u306a\u30b3\u30f3\u30c6\u30ca\u3067\u3059\u3002<\/p>\n<pre><code class=\"language-python\"># \u30ea\u30b9\u30c8\u306e\u4f5c\u6210\nmy_list = [1, 2, 3, 4, 5]\nmixed_list = [1, \"hello\", 3.14, True]\nprint(type(my_list))  # &lt;class 'list'&gt;\n<\/code><\/pre>\n<h3>\u4e3b\u306a\u7279\u5fb4<\/h3>\n<ul>\n<li><strong>\u7570\u306a\u308b\u578b\u306e\u8981\u7d20\u3092\u683c\u7d0d\u53ef\u80fd<\/strong><\/li>\n<li><strong>\u52d5\u7684\u30b5\u30a4\u30ba\u5909\u66f4<\/strong><\/li>\n<li><strong>\u8c4a\u5bcc\u306a\u7d44\u307f\u8fbc\u307f\u30e1\u30bd\u30c3\u30c9<\/strong><\/li>\n<li><strong>\u30e1\u30e2\u30ea\u4f7f\u7528\u91cf\u304c\u591a\u3044<\/strong><\/li>\n<\/ul>\n<pre><code class=\"language-python\"># \u8981\u7d20\u306e\u8ffd\u52a0\u30fb\u524a\u9664\nnumbers = [1, 2, 3]\nnumbers.append(4)\nnumbers.insert(0, 0)\nnumbers.remove(2)\nprint(numbers)  # [0, 1, 3, 4]\n<\/code><\/pre>\n<h3>\u30ea\u30b9\u30c8\u306e\u64cd\u4f5c\u4f8b<\/h3>\n<pre><code class=\"language-python\"># \u30b9\u30e9\u30a4\u30b7\u30f3\u30b0\ndata = [1, 2, 3, 4, 5]\nprint(data[1:4])  # [2, 3, 4]\n\n# \u30ea\u30b9\u30c8\u5185\u5305\u8868\u8a18\nsquares = [x**2 for x in range(5)]\nprint(squares)  # [0, 1, 4, 9, 16]\n\n# \u7d50\u5408\nlist1 = [1, 2]\nlist2 = [3, 4]\ncombined = list1 + list2\nprint(combined)  # [1, 2, 3, 4]\n<\/code><\/pre>\n<h2>2. array.array\uff08\u914d\u5217\uff09<\/h2>\n<h3>\u57fa\u672c\u7684\u306a\u7279\u5fb4<\/h3>\n<p>Python\u306e<code>array<\/code>\u30e2\u30b8\u30e5\u30fc\u30eb\u3067\u63d0\u4f9b\u3055\u308c\u308b\u3001\u540c\u3058\u578b\u306e\u8981\u7d20\u306e\u307f\u3092\u683c\u7d0d\u3059\u308b\u30c7\u30fc\u30bf\u69cb\u9020\u3067\u3059\u3002<\/p>\n<pre><code class=\"language-python\">import array\n\n# \u6574\u6570\u914d\u5217\u306e\u4f5c\u6210\nint_array = array.array('i', [1, 2, 3, 4, 5])\nfloat_array = array.array('f', [1.0, 2.0, 3.0])\nprint(type(int_array))  # &lt;class 'array.array'&gt;\n<\/code><\/pre>\n<h3>\u578b\u30b3\u30fc\u30c9\u306e\u4f8b<\/h3>\n<pre><code class=\"language-python\"># \u3088\u304f\u4f7f\u7528\u3055\u308c\u308b\u578b\u30b3\u30fc\u30c9\nbyte_array = array.array('b', [1, 2, 3])     # \u7b26\u53f7\u4ed8\u304d1\u30d0\u30a4\u30c8\u6574\u6570\nint_array = array.array('i', [1, 2, 3])      # \u7b26\u53f7\u4ed8\u304d\u6574\u6570\nlong_array = array.array('l', [1, 2, 3])     # \u7b26\u53f7\u4ed8\u304d\u9577\u6574\u6570\nfloat_array = array.array('f', [1.0, 2.0])   # \u5358\u7cbe\u5ea6\u6d6e\u52d5\u5c0f\u6570\u70b9\ndouble_array = array.array('d', [1.0, 2.0])  # \u500d\u7cbe\u5ea6\u6d6e\u52d5\u5c0f\u6570\u70b9\n<\/code><\/pre>\n<h3>\u914d\u5217\u306e\u64cd\u4f5c\u4f8b<\/h3>\n<pre><code class=\"language-python\">import array\n\n# \u914d\u5217\u306e\u4f5c\u6210\u3068\u64cd\u4f5c\narr = array.array('i', [1, 2, 3])\narr.append(4)\narr.extend([5, 6])\nprint(arr.tolist())  # [1, 2, 3, 4, 5, 6]\n\n# \u30d5\u30a1\u30a4\u30eb\u3078\u306e\u66f8\u304d\u8fbc\u307f\u30fb\u8aad\u307f\u8fbc\u307f\nwith open('data.bin', 'wb') as f:\n    arr.tofile(f)\n<\/code><\/pre>\n<h2>3. numpy.ndarray<\/h2>\n<h3>\u57fa\u672c\u7684\u306a\u7279\u5fb4<\/h3>\n<p>NumPy\u30e9\u30a4\u30d6\u30e9\u30ea\u3067\u63d0\u4f9b\u3055\u308c\u308b\u3001\u79d1\u5b66\u8a08\u7b97\u306b\u7279\u5316\u3057\u305f\u591a\u6b21\u5143\u914d\u5217\u3067\u3059\u3002<\/p>\n<pre><code class=\"language-python\">import numpy as np\n\n# ndarray\u306e\u4f5c\u6210\narr1 = np.array([1, 2, 3, 4, 5])\narr2 = np.array([[1, 2], [3, 4]])\nprint(type(arr1))  # &lt;class 'numpy.ndarray'&gt;\n<\/code><\/pre>\n<h3>\u591a\u6b21\u5143\u914d\u5217\u306e\u4f5c\u6210<\/h3>\n<pre><code class=\"language-python\">import numpy as np\n\n# 1\u6b21\u5143\u914d\u5217\narr_1d = np.array([1, 2, 3])\n\n# 2\u6b21\u5143\u914d\u5217\narr_2d = np.array([[1, 2, 3], [4, 5, 6]])\n\n# 3\u6b21\u5143\u914d\u5217\narr_3d = np.array([[[1, 2], [3, 4]], [[5, 6], [7, 8]]])\n\nprint(f\"1D shape: {arr_1d.shape}\")  # (3,)\nprint(f\"2D shape: {arr_2d.shape}\")  # (2, 3)\nprint(f\"3D shape: {arr_3d.shape}\")  # (2, 2, 2)\n<\/code><\/pre>\n<h3>\u4fbf\u5229\u306a\u751f\u6210\u95a2\u6570<\/h3>\n<pre><code class=\"language-python\">import numpy as np\n\n# \u30bc\u30ed\u914d\u5217\nzeros = np.zeros((3, 4))\n\n# 1\u3067\u57cb\u3081\u3089\u308c\u305f\u914d\u5217\nones = np.ones((2, 3))\n\n# \u7b49\u5dee\u6570\u5217\nrange_arr = np.arange(0, 10, 2)  # [0, 2, 4, 6, 8]\n\n# \u7b49\u9593\u9694\u306e\u5024\nlinspace_arr = np.linspace(0, 1, 5)  # [0. 0.25 0.5 0.75 1.]\n\n# \u5358\u4f4d\u884c\u5217\nidentity = np.eye(3)\n<\/code><\/pre>\n<h2>\u8a73\u7d30\u6bd4\u8f03\u8868<\/h2>\n<table>\n<thead>\n<tr>\n<th>\u7279\u5fb4<\/th>\n<th>list<\/th>\n<th>array.array<\/th>\n<th>numpy.ndarray<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td><strong>\u30c7\u30fc\u30bf\u578b<\/strong><\/td>\n<td>\u6df7\u5728\u53ef\u80fd<\/td>\n<td>\u540c\u4e00\u578b\u306e\u307f<\/td>\n<td>\u540c\u4e00\u578b\u306e\u307f<\/td>\n<\/tr>\n<tr>\n<td><strong>\u30e1\u30e2\u30ea\u52b9\u7387<\/strong><\/td>\n<td>\u4f4e\u3044<\/td>\n<td>\u4e2d\u7a0b\u5ea6<\/td>\n<td>\u9ad8\u3044<\/td>\n<\/tr>\n<tr>\n<td><strong>\u8a08\u7b97\u901f\u5ea6<\/strong><\/td>\n<td>\u9045\u3044<\/td>\n<td>\u4e2d\u7a0b\u5ea6<\/td>\n<td>\u9ad8\u901f<\/td>\n<\/tr>\n<tr>\n<td><strong>\u591a\u6b21\u5143<\/strong><\/td>\n<td>\u274c<\/td>\n<td>\u274c<\/td>\n<td>\u2705<\/td>\n<\/tr>\n<tr>\n<td><strong>\u6570\u5b66\u6f14\u7b97<\/strong><\/td>\n<td>\u9650\u5b9a\u7684<\/td>\n<td>\u9650\u5b9a\u7684<\/td>\n<td>\u8c4a\u5bcc<\/td>\n<\/tr>\n<tr>\n<td><strong>\u5916\u90e8\u30e9\u30a4\u30d6\u30e9\u30ea<\/strong><\/td>\n<td>\u4e0d\u8981<\/td>\n<td>\u4e0d\u8981<\/td>\n<td>NumPy\u5fc5\u8981<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h2>\u30d1\u30d5\u30a9\u30fc\u30de\u30f3\u30b9\u6bd4\u8f03<\/h2>\n<h3>\u30e1\u30e2\u30ea\u4f7f\u7528\u91cf\u306e\u6bd4\u8f03<\/h3>\n<pre><code class=\"language-python\">import sys\nimport array\nimport numpy as np\n\n# \u540c\u3058\u30c7\u30fc\u30bf\u3067\u306e\u30e1\u30e2\u30ea\u4f7f\u7528\u91cf\u6bd4\u8f03\ndata = list(range(1000))\n\npython_list = data\narray_obj = array.array('i', data)\nnumpy_array = np.array(data)\n\nprint(f\"List size: {sys.getsizeof(python_list)} bytes\")\nprint(f\"Array size: {sys.getsizeof(array_obj)} bytes\")  \nprint(f\"NumPy size: {numpy_array.nbytes} bytes\")\n<\/code><\/pre>\n<h3>\u8a08\u7b97\u901f\u5ea6\u306e\u6bd4\u8f03<\/h3>\n<pre><code class=\"language-python\">import time\nimport numpy as np\n\n# \u5927\u304d\u306a\u30c7\u30fc\u30bf\u30bb\u30c3\u30c8\u3067\u306e\u8a08\u7b97\u6bd4\u8f03\nsize = 1000000\n\n# Python \u30ea\u30b9\u30c8\nstart = time.time()\nlist_data = list(range(size))\nlist_squared = [x**2 for x in list_data]\nlist_time = time.time() - start\n\n# NumPy\u914d\u5217\nstart = time.time()\nnumpy_data = np.arange(size)\nnumpy_squared = numpy_data**2\nnumpy_time = time.time() - start\n\nprint(f\"List time: {list_time:.4f}s\")\nprint(f\"NumPy time: {numpy_time:.4f}s\")\nprint(f\"Speed up: {list_time\/numpy_time:.1f}x\")\n<\/code><\/pre>\n<h2>\u5b9f\u8df5\u7684\u306a\u4f7f\u3044\u5206\u3051<\/h2>\n<h3>1. \u30c7\u30fc\u30bf\u53ce\u96c6\u30fb\u524d\u51e6\u7406\u6bb5\u968e<\/h3>\n<pre><code class=\"language-python\"># \u7570\u306a\u308b\u578b\u306e\u30c7\u30fc\u30bf\u3092\u6271\u3046\u5834\u5408\u306f\u30ea\u30b9\u30c8\nmixed_data = []\nmixed_data.append(\"user_001\")\nmixed_data.append(25)\nmixed_data.append(True)\n<\/code><\/pre>\n<h3>2. \u6570\u5024\u8a08\u7b97\u30fb\u79d1\u5b66\u8a08\u7b97<\/h3>\n<pre><code class=\"language-python\">import numpy as np\n\n# \u884c\u5217\u8a08\u7b97\nmatrix_a = np.array([[1, 2], [3, 4]])\nmatrix_b = np.array([[5, 6], [7, 8]])\nresult = np.dot(matrix_a, matrix_b)\nprint(result)\n<\/code><\/pre>\n<h3>3. \u30d5\u30a1\u30a4\u30eb\u5165\u51fa\u529b<\/h3>\n<pre><code class=\"language-python\">import array\n\n# \u30d0\u30a4\u30ca\u30ea\u30c7\u30fc\u30bf\u306e\u52b9\u7387\u7684\u306a\u51e6\u7406\nsensor_data = array.array('f', [23.5, 24.1, 23.8, 24.3])\nwith open('sensor.dat', 'wb') as f:\n    sensor_data.tofile(f)\n<\/code><\/pre>\n<h2>\u5909\u63db\u65b9\u6cd5<\/h2>\n<h3>\u30ea\u30b9\u30c8 \u2194 array.array<\/h3>\n<pre><code class=\"language-python\">import array\n\n# \u30ea\u30b9\u30c8 \u2192 array\nmy_list = [1, 2, 3, 4, 5]\nmy_array = array.array('i', my_list)\n\n# array \u2192 \u30ea\u30b9\u30c8\nback_to_list = my_array.tolist()\n<\/code><\/pre>\n<h3>\u30ea\u30b9\u30c8 \u2194 numpy.ndarray<\/h3>\n<pre><code class=\"language-python\">import numpy as np\n\n# \u30ea\u30b9\u30c8 \u2192 numpy\nmy_list = [1, 2, 3, 4, 5]\nnumpy_arr = np.array(my_list)\n\n# numpy \u2192 \u30ea\u30b9\u30c8\nback_to_list = numpy_arr.tolist()\n<\/code><\/pre>\n<h3>array.array \u2194 numpy.ndarray<\/h3>\n<pre><code class=\"language-python\">import array\nimport numpy as np\n\n# array \u2192 numpy\nmy_array = array.array('i', [1, 2, 3])\nnumpy_arr = np.frombuffer(my_array, dtype=np.int32)\n\n# numpy \u2192 array\nnumpy_arr = np.array([1, 2, 3], dtype=np.int32)\nmy_array = array.array('i', numpy_arr)\n<\/code><\/pre>\n<h2>\u5177\u4f53\u7684\u306a\u4f7f\u7528\u4f8b<\/h2>\n<h3>1. \u30c7\u30fc\u30bf\u5206\u6790\u3067\u306e\u4f7f\u3044\u5206\u3051<\/h3>\n<pre><code class=\"language-python\">import numpy as np\nimport array\n\n# \u751f\u30c7\u30fc\u30bf\uff08\u30ea\u30b9\u30c8\uff09\nraw_data = [\"temperature\", 23.5, 24.1, 23.8, 24.3]\n\n# \u6570\u5024\u90e8\u5206\u306e\u307f\u62bd\u51fa\uff08array\uff09\nnumeric_data = array.array('f', raw_data[1:])\n\n# \u7d71\u8a08\u8a08\u7b97\uff08numpy\uff09\ntemp_array = np.array(numeric_data)\naverage = np.mean(temp_array)\nstd_dev = np.std(temp_array)\n<\/code><\/pre>\n<h3>2. \u753b\u50cf\u51e6\u7406\u3067\u306e\u4f8b<\/h3>\n<pre><code class=\"language-python\">import numpy as np\n\n# \u753b\u50cf\u30c7\u30fc\u30bf\uff08numpy\u914d\u5217\u3068\u3057\u3066\u6271\u3046\uff09\nimage = np.zeros((100, 100, 3), dtype=np.uint8)  # RGB\u753b\u50cf\n\n# \u30d4\u30af\u30bb\u30eb\u64cd\u4f5c\nimage[25:75, 25:75, 0] = 255  # \u8d64\u3044\u56db\u89d2\u5f62\n\n# \u753b\u50cf\u306e\u5e73\u5747\u8f1d\u5ea6\nbrightness = np.mean(image)\n<\/code><\/pre>\n<h3>3. \u30bb\u30f3\u30b5\u30fc\u30c7\u30fc\u30bf\u306e\u51e6\u7406<\/h3>\n<pre><code class=\"language-python\">import array\nimport numpy as np\n\n# \u30bb\u30f3\u30b5\u30fc\u304b\u3089\u53d6\u5f97\u3057\u305f\u751f\u30c7\u30fc\u30bf\uff08\u52b9\u7387\u7684\u306a\u683c\u7d0d\uff09\nsensor_readings = array.array('f')\nfor i in range(1000):\n    sensor_readings.append(20.0 + i * 0.01)\n\n# \u7d71\u8a08\u5206\u6790\u306e\u305f\u3081\u306bnumpy\u914d\u5217\u306b\u5909\u63db\ndata_analysis = np.array(sensor_readings)\ntrend = np.polyfit(range(len(data_analysis)), data_analysis, 1)\n<\/code><\/pre>\n<h2>\u3088\u304f\u3042\u308b\u9593\u9055\u3044\u3068\u5bfe\u7b56<\/h2>\n<h3>1. \u578b\u306e\u6df7\u5728\u30a8\u30e9\u30fc<\/h3>\n<pre><code class=\"language-python\">import numpy as np\n\n# \u9593\u9055\u3044\uff1a\u7570\u306a\u308b\u578b\u3092\u6df7\u5728\n# arr = np.array([1, \"hello\", 3.14])  # \u6587\u5b57\u5217\u306b\u7d71\u4e00\u3055\u308c\u308b\n\n# \u6b63\u89e3\uff1a\u540c\u3058\u578b\u3067\u7d71\u4e00\narr = np.array([1, 2, 3])  # \u6574\u6570\nstr_arr = np.array([\"hello\", \"world\"])  # \u6587\u5b57\u5217\n<\/code><\/pre>\n<h3>2. \u30e1\u30e2\u30ea\u52b9\u7387\u3092\u8003\u616e\u3057\u306a\u3044\u9078\u629e<\/h3>\n<pre><code class=\"language-python\"># \u5927\u91cf\u306e\u6570\u5024\u30c7\u30fc\u30bf\u306e\u5834\u5408\n# \u975e\u52b9\u7387\uff1a\u30ea\u30b9\u30c8\nlarge_list = [i for i in range(1000000)]\n\n# \u52b9\u7387\u7684\uff1anumpy\u914d\u5217\nlarge_array = np.arange(1000000)\n<\/code><\/pre>\n<h3>3. \u4e0d\u9069\u5207\u306a\u8a08\u7b97\u65b9\u6cd5<\/h3>\n<pre><code class=\"language-python\">import numpy as np\n\n# \u975e\u52b9\u7387\uff1a\u30eb\u30fc\u30d7\u3067\u306e\u8a08\u7b97\nresult = []\nfor x in [1, 2, 3, 4, 5]:\n    result.append(x ** 2)\n\n# \u52b9\u7387\u7684\uff1a\u30d9\u30af\u30c8\u30eb\u5316\u3055\u308c\u305f\u8a08\u7b97\narr = np.array([1, 2, 3, 4, 5])\nresult = arr ** 2\n<\/code><\/pre>\n<h2>\u9078\u629e\u57fa\u6e96\u306e\u30d5\u30ed\u30fc\u30c1\u30e3\u30fc\u30c8<\/h2>\n<pre><code>\u30c7\u30fc\u30bf\u306e\u6027\u8cea\u306f\uff1f\n\u251c\u2500 \u7570\u306a\u308b\u578b\u304c\u6df7\u5728\n\u2502  \u2514\u2500 Python list\n\u251c\u2500 \u540c\u3058\u578b\u306e\u6570\u5024\u306e\u307f\n\u2502  \u251c\u2500 \u5358\u7d14\u306a\u683c\u7d0d\u30fb\u8aad\u307f\u66f8\u304d \u2192 array.array\n\u2502  \u251c\u2500 \u6570\u5b66\u7684\u8a08\u7b97\u304c\u5fc5\u8981 \u2192 numpy.ndarray\n\u2502  \u2514\u2500 \u591a\u6b21\u5143\u30c7\u30fc\u30bf \u2192 numpy.ndarray\n\u2514\u2500 \u8a08\u7b97\u901f\u5ea6\u304c\u91cd\u8981 \u2192 numpy.ndarray\n<\/code><\/pre>\n<h2>\u307e\u3068\u3081<\/h2>\n<p><strong>Python list\uff1a<\/strong><\/p>\n<ul>\n<li>\u7570\u306a\u308b\u578b\u306e\u30c7\u30fc\u30bf\u3092\u683c\u7d0d<\/li>\n<li>\u52d5\u7684\u306a\u30b5\u30a4\u30ba\u5909\u66f4<\/li>\n<li>\u4e00\u822c\u7684\u306a\u30c7\u30fc\u30bf\u51e6\u7406\u306b\u6700\u9069<\/li>\n<\/ul>\n<p><strong>array.array\uff1a<\/strong><\/p>\n<ul>\n<li>\u540c\u3058\u578b\u306e\u6570\u5024\u30c7\u30fc\u30bf<\/li>\n<li>\u30e1\u30e2\u30ea\u52b9\u7387\u304c\u826f\u3044<\/li>\n<li>\u30d5\u30a1\u30a4\u30eb\u5165\u51fa\u529b\u306b\u4fbf\u5229<\/li>\n<\/ul>\n<p><strong>numpy.ndarray\uff1a<\/strong><\/p>\n<ul>\n<li>\u79d1\u5b66\u8a08\u7b97\u30fb\u6570\u5024\u8a08\u7b97<\/li>\n<li>\u9ad8\u901f\u306a\u6f14\u7b97\u51e6\u7406<\/li>\n<li>\u591a\u6b21\u5143\u30c7\u30fc\u30bf\u51e6\u7406<\/li>\n<\/ul>\n<p><strong>\u4f7f\u3044\u5206\u3051\u306e\u539f\u5247\uff1a<\/strong><\/p>\n<ol>\n<li><strong>\u30c7\u30fc\u30bf\u53ce\u96c6\u6bb5\u968e<\/strong> \u2192 list<\/li>\n<li><strong>\u52b9\u7387\u7684\u306a\u683c\u7d0d<\/strong> \u2192 array.array<\/li>\n<li><strong>\u6570\u5024\u8a08\u7b97\u30fb\u5206\u6790<\/strong> \u2192 numpy.ndarray<\/li>\n<\/ol>\n<p>\u9069\u5207\u306a\u9078\u629e\u306b\u3088\u308a\u3001\u30e1\u30e2\u30ea\u52b9\u7387\u3068\u5b9f\u884c\u901f\u5ea6\u306e\u4e21\u65b9\u3092\u6700\u9069\u5316\u3067\u304d\u307e\u3059\u3002\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u306e\u8981\u4ef6\u306b\u5fdc\u3058\u3066\u3001\u6700\u9069\u306a\u30c7\u30fc\u30bf\u69cb\u9020\u3092\u9078\u629e\u3059\u308b\u3053\u3068\u304c\u91cd\u8981\u3067\u3059\u3002<\/p>\n<h2>\u95a2\u9023\u8a18\u4e8b<\/h2>\n<ul>\n<li>NumPy\u914d\u5217\u64cd\u4f5c\u306e\u57fa\u672c\u30ac\u30a4\u30c9<\/li>\n<li>Python\u30ea\u30b9\u30c8\u5185\u5305\u8868\u8a18\u306e\u6d3b\u7528\u6cd5<\/li>\n<li>\u30c7\u30fc\u30bf\u5206\u6790\u306e\u305f\u3081\u306ePandas\u5165\u9580<\/li>\n<\/ul>\n\n\n\n<p>\u25a0\u30d7\u30ed\u30f3\u30d7\u30c8\u3060\u3051\u3067\u30aa\u30ea\u30b8\u30ca\u30eb\u30a2\u30d7\u30ea\u3092\u958b\u767a\u30fb\u516c\u958b\u3057\u3066\u307f\u305f\uff01\uff01<\/p>\n\n\n\n<figure class=\"wp-block-embed is-type-wp-embed\"><div class=\"wp-block-embed__wrapper\">\n<blockquote class=\"wp-embedded-content\" data-secret=\"4GOlFHzSon\"><a href=\"https:\/\/techgym.jp\/column\/ori-app\/\">\u30d7\u30ed\u30f3\u30d7\u30c8\u3060\u3051\u3067\u30aa\u30ea\u30b8\u30ca\u30eb\u30a2\u30d7\u30ea\u3092\u958b\u767a\u30fb\u516c\u958b\u3057\u3066\u307f\u305f\uff01\uff01<\/a><\/blockquote><iframe loading=\"lazy\" class=\"wp-embedded-content\" sandbox=\"allow-scripts\" security=\"restricted\" style=\"position: absolute; visibility: hidden;\" title=\"&#8220;\u30d7\u30ed\u30f3\u30d7\u30c8\u3060\u3051\u3067\u30aa\u30ea\u30b8\u30ca\u30eb\u30a2\u30d7\u30ea\u3092\u958b\u767a\u30fb\u516c\u958b\u3057\u3066\u307f\u305f\uff01\uff01&#8221; &#8212; \u3010\u30c6\u30c3\u30af\u30b8\u30e0\u3011\u683c\u5b89\u30fb\u5bfe\u9762\u578b\u30d7\u30ed\u30b0\u30e9\u30df\u30f3\u30b0\u30b9\u30af\u30fc\u30eb\" src=\"https:\/\/techgym.jp\/column\/ori-app\/embed\/#?secret=hYAU71aUyF#?secret=4GOlFHzSon\" data-secret=\"4GOlFHzSon\" width=\"600\" height=\"338\" frameborder=\"0\" marginwidth=\"0\" marginheight=\"0\" scrolling=\"no\"><\/iframe>\n<\/div><\/figure>\n\n\n\n<p>\u25a0AI\u6642\u4ee3\u306e\u7b2c\u4e00\u6b69\uff01\u300cAI\u99c6\u52d5\u958b\u767a\u30b3\u30fc\u30b9\u300d\u306f\u3058\u3081\u307e\u3057\u305f\uff01<\/p>\n\n\n\n<p>\u30c6\u30c3\u30af\u30b8\u30e0\u6771\u4eac\u672c\u6821\u3067\u5148\u884c\u958b\u59cb\u3002<\/p>\n\n\n\n<figure class=\"wp-block-embed is-type-wp-embed\"><div class=\"wp-block-embed__wrapper\">\n<blockquote class=\"wp-embedded-content\" data-secret=\"hYGvqhv79I\"><a href=\"https:\/\/techgym.jp\/about\/ai-driven-development\/\">AI\u99c6\u52d5\u958b\u767a\/\u751f\u6210AI\u30a8\u30f3\u30b8\u30cb\u30a2\u30b3\u30fc\u30b9\uff08\u521d\u5fc3\u8005\u5411\u3051\uff09<\/a><\/blockquote><iframe loading=\"lazy\" class=\"wp-embedded-content\" sandbox=\"allow-scripts\" security=\"restricted\" style=\"position: absolute; visibility: hidden;\" title=\"&#8220;AI\u99c6\u52d5\u958b\u767a\/\u751f\u6210AI\u30a8\u30f3\u30b8\u30cb\u30a2\u30b3\u30fc\u30b9\uff08\u521d\u5fc3\u8005\u5411\u3051\uff09&#8221; &#8212; \u3010\u30c6\u30c3\u30af\u30b8\u30e0\u3011\u683c\u5b89\u30fb\u5bfe\u9762\u578b\u30d7\u30ed\u30b0\u30e9\u30df\u30f3\u30b0\u30b9\u30af\u30fc\u30eb\" src=\"https:\/\/techgym.jp\/about\/ai-driven-development\/embed\/#?secret=0uRBpF9JRG#?secret=hYGvqhv79I\" data-secret=\"hYGvqhv79I\" width=\"600\" height=\"338\" frameborder=\"0\" marginwidth=\"0\" marginheight=\"0\" scrolling=\"no\"><\/iframe>\n<\/div><\/figure>\n\n\n\n<p>\u25a0\u30c6\u30c3\u30af\u30b8\u30e0\u6771\u4eac\u672c\u6821<\/p>\n\n\n\n<p>\u300c\u6b66\u7530\u587e\u300d\u306e\u30d7\u30ed\u30b0\u30e9\u30df\u30f3\u30b0\u7248\u3068\u3044\u3048\u3070\u300c\u30c6\u30c3\u30af\u30b8\u30e0\u300d\u3002<br>\u8b1b\u7fa9\u52d5\u753b\u306a\u3057\u3001\u6559\u79d1\u66f8\u306a\u3057\u3002\u300c\u9032\u6357\u7ba1\u7406\u3068\u30b3\u30fc\u30c1\u30f3\u30b0\u300d\u3067\u52b9\u7387\u5b66\u7fd2\u3002<br>\u3088\u308a\u65e9\u304f\u3001\u3088\u308a\u5b89\u304f\u3001\u3057\u304b\u3082\u5bfe\u9762\u578b\u306e\u30d7\u30ed\u30b0\u30e9\u30df\u30f3\u30b0\u30b9\u30af\u30fc\u30eb\u3067\u3059\u3002<\/p>\n\n\n\n<figure class=\"wp-block-embed is-type-wp-embed\"><div class=\"wp-block-embed__wrapper\">\n<blockquote class=\"wp-embedded-content\" data-secret=\"ePqkrzgXo2\"><a href=\"https:\/\/techgym.jp\/tokyo\/tokyo_honko\/\">\u30c6\u30c3\u30af\u30b8\u30e0\u6771\u4eac\u672c\u6821<\/a><\/blockquote><iframe loading=\"lazy\" class=\"wp-embedded-content\" sandbox=\"allow-scripts\" security=\"restricted\" style=\"position: absolute; visibility: hidden;\" title=\"&#8220;\u30c6\u30c3\u30af\u30b8\u30e0\u6771\u4eac\u672c\u6821&#8221; &#8212; \u3010\u30c6\u30c3\u30af\u30b8\u30e0\u3011\u683c\u5b89\u30fb\u5bfe\u9762\u578b\u30d7\u30ed\u30b0\u30e9\u30df\u30f3\u30b0\u30b9\u30af\u30fc\u30eb\" src=\"https:\/\/techgym.jp\/tokyo\/tokyo_honko\/embed\/#?secret=L1ah1MtNo0#?secret=ePqkrzgXo2\" data-secret=\"ePqkrzgXo2\" width=\"600\" height=\"338\" frameborder=\"0\" marginwidth=\"0\" marginheight=\"0\" scrolling=\"no\"><\/iframe>\n<\/div><\/figure>\n\n\n\n<p>\uff1c\u77ed\u671f\u8b1b\u7fd2\uff1e5\u65e5\u30675\u4e07\u5186\u306e\u300cPython\u30df\u30cb\u30ad\u30e3\u30f3\u30d7\u300d\u958b\u50ac\u4e2d\u3002<\/p>\n\n\n\n<figure class=\"wp-block-embed is-type-wp-embed\"><div class=\"wp-block-embed__wrapper\">\n<blockquote class=\"wp-embedded-content\" data-secret=\"BrFE3aSkBv\"><a href=\"https:\/\/techgym.jp\/event\/nagatacho_camp\/\">\u72ec\u5b66\u3082\u30aa\u30f3\u30e9\u30a4\u30f3\u3082\u7121\u7406\u3060\u304b\u3089\u3001\u6709\u7d66\u3068\u3063\u3066\u300cPython\u30df\u30cb\u30ad\u30e3\u30f3\u30d7\u300d\u3078\u30105\u65e5\u9593\u30675\u4e07\u5186\u3011<\/a><\/blockquote><iframe loading=\"lazy\" class=\"wp-embedded-content\" sandbox=\"allow-scripts\" security=\"restricted\" style=\"position: absolute; visibility: hidden;\" title=\"&#8220;\u72ec\u5b66\u3082\u30aa\u30f3\u30e9\u30a4\u30f3\u3082\u7121\u7406\u3060\u304b\u3089\u3001\u6709\u7d66\u3068\u3063\u3066\u300cPython\u30df\u30cb\u30ad\u30e3\u30f3\u30d7\u300d\u3078\u30105\u65e5\u9593\u30675\u4e07\u5186\u3011&#8221; &#8212; \u3010\u30c6\u30c3\u30af\u30b8\u30e0\u3011\u683c\u5b89\u30fb\u5bfe\u9762\u578b\u30d7\u30ed\u30b0\u30e9\u30df\u30f3\u30b0\u30b9\u30af\u30fc\u30eb\" src=\"https:\/\/techgym.jp\/event\/nagatacho_camp\/embed\/#?secret=Ig6EMDe4sk#?secret=BrFE3aSkBv\" data-secret=\"BrFE3aSkBv\" width=\"600\" height=\"338\" frameborder=\"0\" marginwidth=\"0\" marginheight=\"0\" scrolling=\"no\"><\/iframe>\n<\/div><\/figure>\n\n\n\n<p>\uff1c\u67081\u958b\u50ac\uff1e\u653e\u9001\u4f5c\u5bb6\u306b\u3088\u308b\u6620\u50cf\u30c7\u30a3\u30ec\u30af\u30bf\u30fc\u990a\u6210\u8b1b\u5ea7<\/p>\n\n\n\n<figure class=\"wp-block-embed is-type-wp-embed\"><div class=\"wp-block-embed__wrapper\">\n<blockquote class=\"wp-embedded-content\" data-secret=\"RzEusu8VYR\"><a href=\"https:\/\/techgym.jp\/event\/video_director\/\">\u73fe\u5f79\u653e\u9001\u4f5c\u5bb6\u304c\u6559\u3048\u308b\u52d5\u753b\u8b1b\u5ea7\uff01\u300e\uff24\uff2f\uff27\uff21\u300f<\/a><\/blockquote><iframe loading=\"lazy\" class=\"wp-embedded-content\" sandbox=\"allow-scripts\" security=\"restricted\" style=\"position: absolute; visibility: hidden;\" title=\"&#8220;\u73fe\u5f79\u653e\u9001\u4f5c\u5bb6\u304c\u6559\u3048\u308b\u52d5\u753b\u8b1b\u5ea7\uff01\u300e\uff24\uff2f\uff27\uff21\u300f&#8221; &#8212; \u3010\u30c6\u30c3\u30af\u30b8\u30e0\u3011\u683c\u5b89\u30fb\u5bfe\u9762\u578b\u30d7\u30ed\u30b0\u30e9\u30df\u30f3\u30b0\u30b9\u30af\u30fc\u30eb\" src=\"https:\/\/techgym.jp\/event\/video_director\/embed\/#?secret=5T1OYSeinI#?secret=RzEusu8VYR\" data-secret=\"RzEusu8VYR\" width=\"600\" height=\"338\" frameborder=\"0\" marginwidth=\"0\" marginheight=\"0\" scrolling=\"no\"><\/iframe>\n<\/div><\/figure>\n\n\n\n<p>\uff1c\u30aa\u30f3\u30e9\u30a4\u30f3\u7121\u6599\uff1e\u30bc\u30ed\u304b\u3089\u59cb\u3081\u308bPython\u7206\u901f\u8b1b\u5ea7<\/p>\n\n\n\n<figure class=\"wp-block-embed is-type-wp-embed\"><div class=\"wp-block-embed__wrapper\">\n<blockquote class=\"wp-embedded-content\" data-secret=\"wjI92sUt5Y\"><a href=\"https:\/\/techgym.jp\/tokyo_python\/\">\u30bc\u30ed\u304b\u3089\u59cb\u3081\u308bPython\u7206\u901f\u8b1b\u5ea7\uff08\u7406\u7cfb\u30fb\u30d7\u30ed\u30b0\u30e9\u30df\u30f3\u30b0\u521d\u5fc3\u8005\u5411\u3051\uff09<\/a><\/blockquote><iframe loading=\"lazy\" class=\"wp-embedded-content\" sandbox=\"allow-scripts\" security=\"restricted\" style=\"position: absolute; visibility: hidden;\" title=\"&#8220;\u30bc\u30ed\u304b\u3089\u59cb\u3081\u308bPython\u7206\u901f\u8b1b\u5ea7\uff08\u7406\u7cfb\u30fb\u30d7\u30ed\u30b0\u30e9\u30df\u30f3\u30b0\u521d\u5fc3\u8005\u5411\u3051\uff09&#8221; &#8212; \u3010\u30c6\u30c3\u30af\u30b8\u30e0\u3011\u683c\u5b89\u30fb\u5bfe\u9762\u578b\u30d7\u30ed\u30b0\u30e9\u30df\u30f3\u30b0\u30b9\u30af\u30fc\u30eb\" src=\"https:\/\/techgym.jp\/tokyo_python\/embed\/#?secret=iBJq5GNp9v#?secret=wjI92sUt5Y\" data-secret=\"wjI92sUt5Y\" width=\"600\" height=\"338\" frameborder=\"0\" marginwidth=\"0\" marginheight=\"0\" scrolling=\"no\"><\/iframe>\n<\/div><\/figure>\n","protected":false},"excerpt":{"rendered":"<p>\u00a0 \u306f\u3058\u3081\u306b Python\u3067\u30c7\u30fc\u30bf\u3092\u6271\u3046\u969b\u3001\u300c\u30ea\u30b9\u30c8\u300d\u300c\u914d\u5217\u300d\u300cnumpy.ndarray\u300d\u3068\u3044\u30463\u3064\u306e\u6982\u5ff5\u304c\u3042\u308a\u3001\u521d\u5fc3\u8005\u306b\u3068\u3063\u3066\u6df7\u4e71\u3057\u3084\u3059\u3044\u30dd\u30a4\u30f3\u30c8\u3067\u3059\u3002\u305d\u308c\u305e\u308c\u7570\u306a\u308b\u7279\u5fb4\u3068\u7528\u9014\u304c\u3042\u308b\u305f\u3081\u3001\u9069\u5207\u306b\u4f7f\u3044\u5206\u3051\u308b\u3053\u3068\u3067\u52b9\u7387\u7684 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":42501,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"om_disable_all_campaigns":false,"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[5],"tags":[],"class_list":["post-43841","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-column"],"views":44,"jetpack_featured_media_url":"\/wp-content\/uploads\/2025\/07\/f3403acf5c65aedec0dba821c4c26404.png","jetpack_sharing_enabled":true,"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/techgym.jp\/wp-json\/wp\/v2\/posts\/43841","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/techgym.jp\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/techgym.jp\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/techgym.jp\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/techgym.jp\/wp-json\/wp\/v2\/comments?post=43841"}],"version-history":[{"count":0,"href":"https:\/\/techgym.jp\/wp-json\/wp\/v2\/posts\/43841\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/techgym.jp\/wp-json\/wp\/v2\/media\/42501"}],"wp:attachment":[{"href":"https:\/\/techgym.jp\/wp-json\/wp\/v2\/media?parent=43841"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/techgym.jp\/wp-json\/wp\/v2\/categories?post=43841"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/techgym.jp\/wp-json\/wp\/v2\/tags?post=43841"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}