{"id":1066411,"date":"2024-12-31T16:26:06","date_gmt":"2024-12-31T08:26:06","guid":{"rendered":"https:\/\/docs.pingcode.com\/ask\/ask-ask\/1066411.html"},"modified":"2024-12-31T16:26:10","modified_gmt":"2024-12-31T08:26:10","slug":"python%e5%a6%82%e4%bd%95%e5%88%9b%e5%bb%ba%e5%85%a8%e9%9b%b6%e6%96%b9%e9%98%b5","status":"publish","type":"post","link":"https:\/\/docs.pingcode.com\/ask\/1066411.html","title":{"rendered":"python\u5982\u4f55\u521b\u5efa\u5168\u96f6\u65b9\u9635"},"content":{"rendered":"<p style=\"text-align:center;\" ><img decoding=\"async\" src=\"https:\/\/cdn-docs.pingcode.com\/wp-content\/uploads\/2024\/12\/fe4ee612-242e-4661-ab74-3472de69e30f.webp?x-oss-process=image\/auto-orient,1\/format,webp\" alt=\"python\u5982\u4f55\u521b\u5efa\u5168\u96f6\u65b9\u9635\" \/><\/p>\n<p><p> \u521b\u5efa\u4e00\u4e2a\u5168\u96f6\u65b9\u9635\u5728Python\u4e2d\u975e\u5e38\u7b80\u5355\uff0c\u5e76\u4e14\u6709\u591a\u79cd\u65b9\u6cd5\u3002<strong>\u4f7f\u7528NumPy\u5e93\u3001\u5217\u8868\u63a8\u5bfc\u5f0f\u3001\u5217\u8868\u4e58\u6cd5<\/strong>\u7b49\u65b9\u6cd5\u90fd\u53ef\u4ee5\u5b9e\u73b0\u3002\u4e0b\u9762\u6211\u4eec\u5177\u4f53\u4ecb\u7ecd\u5982\u4f55\u4f7f\u7528\u8fd9\u4e9b\u65b9\u6cd5\u6765\u521b\u5efa\u4e00\u4e2a\u5168\u96f6\u65b9\u9635\uff0c\u5e76\u8be6\u7ec6\u8ba8\u8bba\u6bcf\u79cd\u65b9\u6cd5\u7684\u5177\u4f53\u6b65\u9aa4\u548c\u9002\u7528\u573a\u666f\u3002<\/p>\n<\/p>\n<p><h3>\u4e00\u3001\u4f7f\u7528NumPy\u5e93<\/h3>\n<\/p>\n<p><p>NumPy\u662fPython\u4e2d\u4e00\u4e2a\u975e\u5e38\u5f3a\u5927\u7684\u79d1\u5b66\u8ba1\u7b97\u5e93\uff0c\u63d0\u4f9b\u4e86\u4e30\u5bcc\u7684\u6570\u7ec4\u548c\u77e9\u9635\u64cd\u4f5c\u529f\u80fd\u3002\u4f7f\u7528NumPy\u521b\u5efa\u5168\u96f6\u65b9\u9635\u662f\u6700\u5e38\u89c1\u548c\u65b9\u4fbf\u7684\u65b9\u6cd5\u4e4b\u4e00\u3002<\/p>\n<\/p>\n<p><h4>1. \u5b89\u88c5NumPy\u5e93<\/h4>\n<\/p>\n<p><p>\u5728\u4f7f\u7528NumPy\u4e4b\u524d\uff0c\u9996\u5148\u9700\u8981\u786e\u4fdd\u5df2\u5b89\u88c5NumPy\u5e93\u3002\u5982\u679c\u6ca1\u6709\u5b89\u88c5\uff0c\u53ef\u4ee5\u4f7f\u7528\u4ee5\u4e0b\u547d\u4ee4\u6765\u5b89\u88c5\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-bash\">pip install numpy<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h4>2. \u521b\u5efa\u5168\u96f6\u65b9\u9635<\/h4>\n<\/p>\n<p><p>\u4f7f\u7528NumPy\u521b\u5efa\u5168\u96f6\u65b9\u9635\u975e\u5e38\u7b80\u5355\uff0c\u53ea\u9700\u8981\u8c03\u7528<code>numpy.zeros()<\/code>\u51fd\u6570\u5373\u53ef\u3002\u4e0b\u9762\u662f\u4e00\u4e2a\u793a\u4f8b\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">import numpy as np<\/p>\n<h2><strong>\u521b\u5efa\u4e00\u4e2a3x3\u7684\u5168\u96f6\u65b9\u9635<\/strong><\/h2>\n<p>n = 3<\/p>\n<p>zero_matrix = np.zeros((n, n))<\/p>\n<p>print(zero_matrix)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u5728\u4e0a\u8ff0\u4ee3\u7801\u4e2d\uff0c\u6211\u4eec\u9996\u5148\u5bfc\u5165\u4e86NumPy\u5e93\uff0c\u7136\u540e\u5b9a\u4e49\u4e86\u65b9\u9635\u7684\u5927\u5c0f<code>n<\/code>\uff0c\u63a5\u7740\u4f7f\u7528<code>np.zeros()<\/code>\u51fd\u6570\u521b\u5efa\u4e86\u4e00\u4e2a3&#215;3\u7684\u5168\u96f6\u65b9\u9635\uff0c\u5e76\u5c06\u5176\u6253\u5370\u51fa\u6765\u3002<\/p>\n<\/p>\n<p><h3>\u4e8c\u3001\u4f7f\u7528\u5217\u8868\u63a8\u5bfc\u5f0f<\/h3>\n<\/p>\n<p><p>\u5217\u8868\u63a8\u5bfc\u5f0f\u662fPython\u4e2d\u7684\u4e00\u79cd\u7b80\u6d01\u8bed\u6cd5\uff0c\u5e38\u7528\u4e8e\u521b\u5efa\u5217\u8868\u3002\u6211\u4eec\u53ef\u4ee5\u4f7f\u7528\u5217\u8868\u63a8\u5bfc\u5f0f\u6765\u521b\u5efa\u4e00\u4e2a\u5168\u96f6\u65b9\u9635\u3002<\/p>\n<\/p>\n<p><h4>1. \u521b\u5efa\u5168\u96f6\u65b9\u9635<\/h4>\n<\/p>\n<p><p>\u4f7f\u7528\u5217\u8868\u63a8\u5bfc\u5f0f\u521b\u5efa\u5168\u96f6\u65b9\u9635\u7684\u6b65\u9aa4\u5982\u4e0b\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\"># \u5b9a\u4e49\u65b9\u9635\u7684\u5927\u5c0f<\/p>\n<p>n = 3<\/p>\n<h2><strong>\u4f7f\u7528\u5217\u8868\u63a8\u5bfc\u5f0f\u521b\u5efa\u5168\u96f6\u65b9\u9635<\/strong><\/h2>\n<p>zero_matrix = [[0 for _ in range(n)] for _ in range(n)]<\/p>\n<p>print(zero_matrix)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u5728\u4e0a\u8ff0\u4ee3\u7801\u4e2d\uff0c\u6211\u4eec\u9996\u5148\u5b9a\u4e49\u4e86\u65b9\u9635\u7684\u5927\u5c0f<code>n<\/code>\uff0c\u7136\u540e\u4f7f\u7528\u5d4c\u5957\u7684\u5217\u8868\u63a8\u5bfc\u5f0f\u521b\u5efa\u4e86\u4e00\u4e2a\u5168\u96f6\u65b9\u9635\uff0c\u5e76\u5c06\u5176\u6253\u5370\u51fa\u6765\u3002<\/p>\n<\/p>\n<p><h3>\u4e09\u3001\u4f7f\u7528\u5217\u8868\u4e58\u6cd5<\/h3>\n<\/p>\n<p><p>\u5217\u8868\u4e58\u6cd5\u662fPython\u4e2d\u4e00\u79cd\u5feb\u901f\u521b\u5efa\u91cd\u590d\u5143\u7d20\u5217\u8868\u7684\u65b9\u6cd5\u3002\u6211\u4eec\u53ef\u4ee5\u4f7f\u7528\u5217\u8868\u4e58\u6cd5\u6765\u521b\u5efa\u4e00\u4e2a\u5168\u96f6\u65b9\u9635\u3002<\/p>\n<\/p>\n<p><h4>1. \u521b\u5efa\u5168\u96f6\u65b9\u9635<\/h4>\n<\/p>\n<p><p>\u4f7f\u7528\u5217\u8868\u4e58\u6cd5\u521b\u5efa\u5168\u96f6\u65b9\u9635\u7684\u6b65\u9aa4\u5982\u4e0b\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\"># \u5b9a\u4e49\u65b9\u9635\u7684\u5927\u5c0f<\/p>\n<p>n = 3<\/p>\n<h2><strong>\u4f7f\u7528\u5217\u8868\u4e58\u6cd5\u521b\u5efa\u5168\u96f6\u65b9\u9635<\/strong><\/h2>\n<p>zero_matrix = [[0] * n for _ in range(n)]<\/p>\n<p>print(zero_matrix)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u5728\u4e0a\u8ff0\u4ee3\u7801\u4e2d\uff0c\u6211\u4eec\u9996\u5148\u5b9a\u4e49\u4e86\u65b9\u9635\u7684\u5927\u5c0f<code>n<\/code>\uff0c\u7136\u540e\u4f7f\u7528\u5217\u8868\u4e58\u6cd5\u521b\u5efa\u4e86\u4e00\u4e2a\u5168\u96f6\u65b9\u9635\uff0c\u5e76\u5c06\u5176\u6253\u5370\u51fa\u6765\u3002<\/p>\n<\/p>\n<p><h3>\u56db\u3001\u4f7f\u7528\u5d4c\u5957\u5faa\u73af<\/h3>\n<\/p>\n<p><p>\u9664\u4e86\u4e0a\u8ff0\u65b9\u6cd5\u4e4b\u5916\uff0c\u6211\u4eec\u8fd8\u53ef\u4ee5\u4f7f\u7528\u5d4c\u5957\u5faa\u73af\u6765\u521b\u5efa\u4e00\u4e2a\u5168\u96f6\u65b9\u9635\u3002\u867d\u7136\u8fd9\u79cd\u65b9\u6cd5\u6bd4\u8f83\u7e41\u7410\uff0c\u4f46\u4e5f\u975e\u5e38\u76f4\u89c2\u3002<\/p>\n<\/p>\n<p><h4>1. \u521b\u5efa\u5168\u96f6\u65b9\u9635<\/h4>\n<\/p>\n<p><p>\u4f7f\u7528\u5d4c\u5957\u5faa\u73af\u521b\u5efa\u5168\u96f6\u65b9\u9635\u7684\u6b65\u9aa4\u5982\u4e0b\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\"># \u5b9a\u4e49\u65b9\u9635\u7684\u5927\u5c0f<\/p>\n<p>n = 3<\/p>\n<h2><strong>\u521b\u5efa\u4e00\u4e2a\u7a7a\u5217\u8868<\/strong><\/h2>\n<p>zero_matrix = []<\/p>\n<h2><strong>\u4f7f\u7528\u5d4c\u5957\u5faa\u73af\u586b\u5145\u5168\u96f6\u65b9\u9635<\/strong><\/h2>\n<p>for i in range(n):<\/p>\n<p>    row = []<\/p>\n<p>    for j in range(n):<\/p>\n<p>        row.append(0)<\/p>\n<p>    zero_matrix.append(row)<\/p>\n<p>print(zero_matrix)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u5728\u4e0a\u8ff0\u4ee3\u7801\u4e2d\uff0c\u6211\u4eec\u9996\u5148\u5b9a\u4e49\u4e86\u65b9\u9635\u7684\u5927\u5c0f<code>n<\/code>\uff0c\u7136\u540e\u521b\u5efa\u4e86\u4e00\u4e2a\u7a7a\u5217\u8868<code>zero_matrix<\/code>\u3002\u63a5\u7740\u4f7f\u7528\u5d4c\u5957\u5faa\u73af\u586b\u5145\u5168\u96f6\u65b9\u9635\uff0c\u6700\u540e\u5c06\u5176\u6253\u5370\u51fa\u6765\u3002<\/p>\n<\/p>\n<p><h3>\u4e94\u3001\u6027\u80fd\u6bd4\u8f83<\/h3>\n<\/p>\n<p><p>\u5728\u521b\u5efa\u5168\u96f6\u65b9\u9635\u65f6\uff0c\u4e0d\u540c\u7684\u65b9\u6cd5\u5728\u6027\u80fd\u4e0a\u53ef\u80fd\u4f1a\u6709\u6240\u5dee\u5f02\u3002\u901a\u5e38\u6765\u8bf4\uff0c\u4f7f\u7528NumPy\u5e93\u7684\u65b9\u6cd5\u6027\u80fd\u6700\u4f73\uff0c\u9002\u7528\u4e8e\u5927\u89c4\u6a21\u77e9\u9635\u64cd\u4f5c\uff1b\u800c\u5217\u8868\u63a8\u5bfc\u5f0f\u548c\u5217\u8868\u4e58\u6cd5\u65b9\u6cd5\u5728\u4e2d\u5c0f\u89c4\u6a21\u77e9\u9635\u64cd\u4f5c\u65f6\u4e5f\u8868\u73b0\u826f\u597d\u3002\u4f7f\u7528\u5d4c\u5957\u5faa\u73af\u7684\u65b9\u6cd5\u867d\u7136\u76f4\u89c2\uff0c\u4f46\u5728\u6027\u80fd\u4e0a\u53ef\u80fd\u7a0d\u900a\u4e00\u7b79\u3002<\/p>\n<\/p>\n<p><p>\u6211\u4eec\u53ef\u4ee5\u901a\u8fc7\u5b9e\u9645\u6d4b\u8bd5\u6765\u6bd4\u8f83\u4e0d\u540c\u65b9\u6cd5\u7684\u6027\u80fd\u3002\u4e0b\u9762\u662f\u4e00\u4e2a\u7b80\u5355\u7684\u6027\u80fd\u6d4b\u8bd5\u793a\u4f8b\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">import numpy as np<\/p>\n<p>import time<\/p>\n<h2><strong>\u5b9a\u4e49\u65b9\u9635\u7684\u5927\u5c0f<\/strong><\/h2>\n<p>n = 1000<\/p>\n<h2><strong>\u4f7f\u7528NumPy\u521b\u5efa\u5168\u96f6\u65b9\u9635<\/strong><\/h2>\n<p>start_time = time.time()<\/p>\n<p>zero_matrix_np = np.zeros((n, n))<\/p>\n<p>print(&quot;NumPy\u65b9\u6cd5\u8017\u65f6: {:.6f} \u79d2&quot;.format(time.time() - start_time))<\/p>\n<h2><strong>\u4f7f\u7528\u5217\u8868\u63a8\u5bfc\u5f0f\u521b\u5efa\u5168\u96f6\u65b9\u9635<\/strong><\/h2>\n<p>start_time = time.time()<\/p>\n<p>zero_matrix_list_comprehension = [[0 for _ in range(n)] for _ in range(n)]<\/p>\n<p>print(&quot;\u5217\u8868\u63a8\u5bfc\u5f0f\u65b9\u6cd5\u8017\u65f6: {:.6f} \u79d2&quot;.format(time.time() - start_time))<\/p>\n<h2><strong>\u4f7f\u7528\u5217\u8868\u4e58\u6cd5\u521b\u5efa\u5168\u96f6\u65b9\u9635<\/strong><\/h2>\n<p>start_time = time.time()<\/p>\n<p>zero_matrix_list_multiplication = [[0] * n for _ in range(n)]<\/p>\n<p>print(&quot;\u5217\u8868\u4e58\u6cd5\u65b9\u6cd5\u8017\u65f6: {:.6f} \u79d2&quot;.format(time.time() - start_time))<\/p>\n<h2><strong>\u4f7f\u7528\u5d4c\u5957\u5faa\u73af\u521b\u5efa\u5168\u96f6\u65b9\u9635<\/strong><\/h2>\n<p>start_time = time.time()<\/p>\n<p>zero_matrix_nested_loop = []<\/p>\n<p>for i in range(n):<\/p>\n<p>    row = []<\/p>\n<p>    for j in range(n):<\/p>\n<p>        row.append(0)<\/p>\n<p>    zero_matrix_nested_loop.append(row)<\/p>\n<p>print(&quot;\u5d4c\u5957\u5faa\u73af\u65b9\u6cd5\u8017\u65f6: {:.6f} \u79d2&quot;.format(time.time() - start_time))<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u5728\u4e0a\u8ff0\u4ee3\u7801\u4e2d\uff0c\u6211\u4eec\u9996\u5148\u5b9a\u4e49\u4e86\u65b9\u9635\u7684\u5927\u5c0f<code>n<\/code>\uff0c\u7136\u540e\u5206\u522b\u4f7f\u7528\u4e0d\u540c\u7684\u65b9\u6cd5\u521b\u5efa\u5168\u96f6\u65b9\u9635\uff0c\u5e76\u8bb0\u5f55\u6bcf\u79cd\u65b9\u6cd5\u7684\u8017\u65f6\u3002\u901a\u8fc7\u6bd4\u8f83\u4e0d\u540c\u65b9\u6cd5\u7684\u8017\u65f6\uff0c\u6211\u4eec\u53ef\u4ee5\u5f97\u51fa\u6027\u80fd\u6700\u4f73\u7684\u65b9\u6cd5\u3002<\/p>\n<\/p>\n<p><h3>\u516d\u3001\u603b\u7ed3<\/h3>\n<\/p>\n<p><p>\u521b\u5efa\u5168\u96f6\u65b9\u9635\u5728Python\u4e2d\u6709\u591a\u79cd\u65b9\u6cd5\uff0c\u6bcf\u79cd\u65b9\u6cd5\u90fd\u6709\u5176\u9002\u7528\u7684\u573a\u666f\u548c\u4f18\u7f3a\u70b9\u3002<strong>\u4f7f\u7528NumPy\u5e93\u65b9\u6cd5\u6027\u80fd\u6700\u4f73\u3001\u5217\u8868\u63a8\u5bfc\u5f0f\u65b9\u6cd5\u7b80\u6d01\u76f4\u89c2\u3001\u5217\u8868\u4e58\u6cd5\u65b9\u6cd5\u9ad8\u6548\u3001\u5d4c\u5957\u5faa\u73af\u65b9\u6cd5\u76f4\u89c2\u4f46\u7a0d\u663e\u7e41\u7410\u3002<\/strong>\u9009\u62e9\u9002\u5408\u81ea\u5df1\u9700\u6c42\u7684\u65b9\u6cd5\uff0c\u53ef\u4ee5\u66f4\u9ad8\u6548\u5730\u5b8c\u6210\u4efb\u52a1\u3002<\/p>\n<\/p>\n<p><p>\u5e0c\u671b\u901a\u8fc7\u672c\u6587\u7684\u4ecb\u7ecd\uff0c\u80fd\u591f\u5e2e\u52a9\u5927\u5bb6\u66f4\u597d\u5730\u7406\u89e3\u548c\u638c\u63e1\u5728Python\u4e2d\u521b\u5efa\u5168\u96f6\u65b9\u9635\u7684\u65b9\u6cd5\u3002\u65e0\u8bba\u662f\u8fdb\u884c\u79d1\u5b66\u8ba1\u7b97\u3001\u6570\u636e\u5206\u6790\u8fd8\u662f\u5176\u4ed6\u5e94\u7528\u573a\u666f\uff0c\u90fd\u80fd\u5f97\u5fc3\u5e94\u624b\u3002<\/p>\n<\/p>\n<h2><strong>\u76f8\u5173\u95ee\u7b54FAQs\uff1a<\/strong><\/h2>\n<p> <strong>\u5982\u4f55\u5728Python\u4e2d\u521b\u5efa\u4e00\u4e2a\u6307\u5b9a\u5927\u5c0f\u7684\u5168\u96f6\u65b9\u9635\uff1f<\/strong><br \/>\u5728Python\u4e2d\uff0c\u53ef\u4ee5\u4f7f\u7528NumPy\u5e93\u6765\u521b\u5efa\u5168\u96f6\u65b9\u9635\u3002\u9996\u5148\uff0c\u786e\u4fdd\u5df2\u7ecf\u5b89\u88c5\u4e86NumPy\u5e93\u3002\u53ef\u4ee5\u4f7f\u7528\u4ee5\u4e0b\u4ee3\u7801\u521b\u5efa\u4e00\u4e2an x n\u7684\u5168\u96f6\u65b9\u9635\uff1a  <\/p>\n<pre><code class=\"language-python\">import numpy as np\nn = 3  # \u8fd9\u91cc\u53ef\u4ee5\u66f4\u6539\u4e3a\u6240\u9700\u7684\u5927\u5c0f\nzero_matrix = np.zeros((n, n))\nprint(zero_matrix)\n<\/code><\/pre>\n<p>\u8fd9\u4e2a\u4ee3\u7801\u5c06\u751f\u6210\u4e00\u4e2a3&#215;3\u7684\u5168\u96f6\u65b9\u9635\u3002\u901a\u8fc7\u66f4\u6539\u53d8\u91cfn\uff0c\u4f60\u53ef\u4ee5\u521b\u5efa\u4efb\u610f\u5927\u5c0f\u7684\u65b9\u9635\u3002<\/p>\n<p><strong>\u4f7f\u7528Python\u5217\u8868\u521b\u5efa\u5168\u96f6\u65b9\u9635\u7684\u66ff\u4ee3\u65b9\u6cd5\u662f\u4ec0\u4e48\uff1f<\/strong><br \/>\u5982\u679c\u4e0d\u60f3\u4f7f\u7528NumPy\u5e93\uff0cPython\u7684\u5185\u7f6e\u5217\u8868\u4e5f\u53ef\u4ee5\u521b\u5efa\u5168\u96f6\u65b9\u9635\u3002\u53ef\u4ee5\u4f7f\u7528\u5217\u8868\u63a8\u5bfc\u5f0f\u6765\u5b9e\u73b0\uff1a  <\/p>\n<pre><code class=\"language-python\">n = 3  # \u8fd9\u91cc\u53ef\u4ee5\u66f4\u6539\u4e3a\u6240\u9700\u7684\u5927\u5c0f\nzero_matrix = [[0 for _ in range(n)] for _ in range(n)]\nprint(zero_matrix)\n<\/code><\/pre>\n<p>\u8fd9\u79cd\u65b9\u6cd5\u540c\u6837\u53ef\u4ee5\u521b\u5efa\u4e00\u4e2a3&#215;3\u7684\u5168\u96f6\u65b9\u9635\uff0c\u9002\u5408\u5728\u4e0d\u4f9d\u8d56\u5916\u90e8\u5e93\u7684\u60c5\u51b5\u4e0b\u4f7f\u7528\u3002<\/p>\n<p><strong>\u521b\u5efa\u5168\u96f6\u65b9\u9635\u65f6\uff0c\u5982\u4f55\u786e\u4fdd\u5176\u5143\u7d20\u7684\u6570\u636e\u7c7b\u578b\uff1f<\/strong><br \/>\u5728\u4f7f\u7528NumPy\u521b\u5efa\u5168\u96f6\u65b9\u9635\u65f6\uff0c\u53ef\u4ee5\u901a\u8fc7dtype\u53c2\u6570\u6307\u5b9a\u5143\u7d20\u7684\u6570\u636e\u7c7b\u578b\u3002\u4f8b\u5982\uff0c\u5982\u679c\u60f3\u521b\u5efa\u4e00\u4e2a\u5168\u96f6\u7684\u6574\u6570\u65b9\u9635\uff0c\u53ef\u4ee5\u8fd9\u6837\u505a\uff1a  <\/p>\n<pre><code class=\"language-python\">zero_matrix = np.zeros((n, n), dtype=int)\nprint(zero_matrix)\n<\/code><\/pre>\n<p>\u5bf9\u4e8e\u5217\u8868\u65b9\u6cd5\uff0c\u6240\u6709\u5143\u7d20\u9ed8\u8ba4\u662f\u6574\u65700\u3002\u5982\u679c\u9700\u8981\u5176\u4ed6\u7c7b\u578b\uff0c\u53ef\u4ee5\u5728\u521b\u5efa\u5217\u8868\u65f6\u8fdb\u884c\u8f6c\u6362\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"\u521b\u5efa\u4e00\u4e2a\u5168\u96f6\u65b9\u9635\u5728Python\u4e2d\u975e\u5e38\u7b80\u5355\uff0c\u5e76\u4e14\u6709\u591a\u79cd\u65b9\u6cd5\u3002\u4f7f\u7528NumPy\u5e93\u3001\u5217\u8868\u63a8\u5bfc\u5f0f\u3001\u5217\u8868\u4e58\u6cd5\u7b49\u65b9\u6cd5\u90fd\u53ef\u4ee5\u5b9e [&hellip;]","protected":false},"author":3,"featured_media":1066421,"comment_status":"closed","ping_status":"","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[37],"tags":[],"acf":[],"_links":{"self":[{"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/1066411"}],"collection":[{"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/comments?post=1066411"}],"version-history":[{"count":"1","href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/1066411\/revisions"}],"predecessor-version":[{"id":1066423,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/1066411\/revisions\/1066423"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media\/1066421"}],"wp:attachment":[{"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media?parent=1066411"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/categories?post=1066411"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/tags?post=1066411"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}