{"id":1139392,"date":"2025-01-08T22:09:52","date_gmt":"2025-01-08T14:09:52","guid":{"rendered":"https:\/\/docs.pingcode.com\/ask\/ask-ask\/1139392.html"},"modified":"2025-01-08T22:09:52","modified_gmt":"2025-01-08T14:09:52","slug":"python%e4%b8%ad%e5%a6%82%e4%bd%95%e5%b0%86%e4%b8%80%e4%b8%aa%e7%9f%a9%e9%98%b5%e5%8f%98%e6%88%90%e5%90%91%e9%87%8f","status":"publish","type":"post","link":"https:\/\/docs.pingcode.com\/ask\/ask-ask\/1139392.html","title":{"rendered":"python\u4e2d\u5982\u4f55\u5c06\u4e00\u4e2a\u77e9\u9635\u53d8\u6210\u5411\u91cf"},"content":{"rendered":"<p style=\"text-align:center;\" ><img decoding=\"async\" src=\"https:\/\/cdn-kb.worktile.com\/kb\/wp-content\/uploads\/2024\/04\/25102723\/31ec5a99-f652-4e3c-9ca7-0697888fb611.webp\" alt=\"python\u4e2d\u5982\u4f55\u5c06\u4e00\u4e2a\u77e9\u9635\u53d8\u6210\u5411\u91cf\" \/><\/p>\n<p><p> <strong>Python\u4e2d\u5c06\u4e00\u4e2a\u77e9\u9635\u53d8\u6210\u5411\u91cf\u7684\u65b9\u6cd5\u6709\u591a\u79cd\uff0c\u4e3b\u8981\u6709\u4f7f\u7528NumPy\u7684<code>flatten<\/code>\u65b9\u6cd5\u3001<code>ravel<\/code>\u65b9\u6cd5\u3001\u4ee5\u53ca\u624b\u52a8\u904d\u5386\u77e9\u9635\u5c06\u5176\u8f6c\u5316\u4e3a\u5217\u8868\u7b49\u3002<\/strong> \u5728\u4f7f\u7528\u8fd9\u4e9b\u65b9\u6cd5\u65f6\uff0c<strong>NumPy\u5e93<\/strong>\u662f\u6700\u5e38\u7528\u7684\uff0c\u56e0\u4e3a\u5b83\u63d0\u4f9b\u4e86\u5f3a\u5927\u7684\u6570\u503c\u8ba1\u7b97\u529f\u80fd\u548c\u4e30\u5bcc\u7684\u77e9\u9635\u64cd\u4f5c\u5de5\u5177\u3002\u4e0b\u9762\u5c06\u8be6\u7ec6\u4ecb\u7ecd\u5982\u4f55\u4f7f\u7528\u8fd9\u4e9b\u65b9\u6cd5\uff0c\u5e76\u8ba8\u8bba\u6bcf\u79cd\u65b9\u6cd5\u7684\u4f18\u7f3a\u70b9\u3002<\/p>\n<\/p>\n<p><h2>\u4e00\u3001\u4f7f\u7528NumPy\u7684flatten\u65b9\u6cd5<\/h2>\n<\/p>\n<p><p>NumPy\u662fPython\u4e2d\u5904\u7406\u77e9\u9635\u548c\u6570\u7ec4\u7684\u6700\u5e38\u7528\u5e93\u4e4b\u4e00\u3002<code>flatten<\/code>\u65b9\u6cd5\u662fNumPy\u5e93\u63d0\u4f9b\u7684\u4e00\u79cd\u5c06\u591a\u7ef4\u6570\u7ec4\u964d\u7ef4\u7684\u65b9\u6cd5\u3002\u4f7f\u7528<code>flatten<\/code>\u65b9\u6cd5\uff0c\u53ef\u4ee5\u975e\u5e38\u65b9\u4fbf\u5730\u5c06\u4e00\u4e2a\u77e9\u9635\u8f6c\u6362\u4e3a\u5411\u91cf\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">import numpy as np<\/p>\n<h2><strong>\u521b\u5efa\u4e00\u4e2a3x3\u77e9\u9635<\/strong><\/h2>\n<p>matrix = np.array([[1, 2, 3],<\/p>\n<p>                   [4, 5, 6],<\/p>\n<p>                   [7, 8, 9]])<\/p>\n<h2><strong>\u4f7f\u7528flatten\u65b9\u6cd5\u5c06\u77e9\u9635\u8f6c\u6362\u4e3a\u5411\u91cf<\/strong><\/h2>\n<p>vector = matrix.flatten()<\/p>\n<p>print(vector)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p><strong>\u4f18\u70b9\uff1a<\/strong><\/p>\n<\/p>\n<ul>\n<li><strong>\u7b80\u5355\u6613\u7528<\/strong>\uff1a\u53ea\u9700\u4e00\u884c\u4ee3\u7801\u5373\u53ef\u5b8c\u6210\u77e9\u9635\u5230\u5411\u91cf\u7684\u8f6c\u6362\u3002<\/li>\n<li><strong>\u9ad8\u6548<\/strong>\uff1aNumPy\u5e95\u5c42\u8fdb\u884c\u4e86\u4f18\u5316\uff0c\u8f6c\u6362\u901f\u5ea6\u5feb\u3002<\/li>\n<\/ul>\n<p><p><strong>\u7f3a\u70b9\uff1a<\/strong><\/p>\n<\/p>\n<ul>\n<li><strong>\u8fd4\u56de\u526f\u672c<\/strong>\uff1a<code>flatten<\/code>\u65b9\u6cd5\u4f1a\u8fd4\u56de\u4e00\u4e2a\u65b0\u7684\u6570\u7ec4\uff0c\u800c\u4e0d\u662f\u5728\u539f\u6570\u7ec4\u4e0a\u8fdb\u884c\u64cd\u4f5c\uff0c\u8fd9\u53ef\u80fd\u4f1a\u5360\u7528\u66f4\u591a\u7684\u5185\u5b58\u3002<\/li>\n<\/ul>\n<p><h2>\u4e8c\u3001\u4f7f\u7528NumPy\u7684ravel\u65b9\u6cd5<\/h2>\n<\/p>\n<p><p><code>ravel<\/code>\u65b9\u6cd5\u4e0e<code>flatten<\/code>\u7c7b\u4f3c\uff0c\u4f46\u6709\u4e00\u4e9b\u4e0d\u540c\u4e4b\u5904\u3002<code>ravel<\/code>\u65b9\u6cd5\u8fd4\u56de\u7684\u662f\u4e00\u4e2a\u89c6\u56fe\uff08view\uff09\uff0c\u5982\u679c\u53ef\u80fd\u7684\u8bdd\uff0c\u5b83\u4f1a\u8fd4\u56de\u539f\u6570\u7ec4\u7684\u4e00\u4e2a\u89c6\u56fe\uff0c\u800c\u4e0d\u662f\u4e00\u4e2a\u526f\u672c\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">import numpy as np<\/p>\n<h2><strong>\u521b\u5efa\u4e00\u4e2a3x3\u77e9\u9635<\/strong><\/h2>\n<p>matrix = np.array([[1, 2, 3],<\/p>\n<p>                   [4, 5, 6],<\/p>\n<p>                   [7, 8, 9]])<\/p>\n<h2><strong>\u4f7f\u7528ravel\u65b9\u6cd5\u5c06\u77e9\u9635\u8f6c\u6362\u4e3a\u5411\u91cf<\/strong><\/h2>\n<p>vector = matrix.ravel()<\/p>\n<p>print(vector)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p><strong>\u4f18\u70b9\uff1a<\/strong><\/p>\n<\/p>\n<ul>\n<li><strong>\u5185\u5b58\u6548\u7387\u9ad8<\/strong>\uff1a\u5982\u679c\u6761\u4ef6\u5141\u8bb8\uff0c<code>ravel<\/code>\u65b9\u6cd5\u4f1a\u8fd4\u56de\u539f\u6570\u7ec4\u7684\u89c6\u56fe\uff0c\u8282\u7701\u5185\u5b58\u3002<\/li>\n<li><strong>\u7075\u6d3b\u6027\u9ad8<\/strong>\uff1a\u53ef\u4ee5\u9009\u62e9\u8fd4\u56de\u89c6\u56fe\u6216\u526f\u672c\uff0c\u901a\u8fc7\u4f20\u9012\u53c2\u6570<code>order<\/code>\u6765\u6307\u5b9a\u5c55\u5f00\u7684\u987a\u5e8f\u3002<\/li>\n<\/ul>\n<p><p><strong>\u7f3a\u70b9\uff1a<\/strong><\/p>\n<\/p>\n<ul>\n<li><strong>\u6f5c\u5728\u7684\u526f\u4f5c\u7528<\/strong>\uff1a\u56e0\u4e3a\u53ef\u80fd\u8fd4\u56de\u89c6\u56fe\uff0c\u5bf9\u8fd4\u56de\u7684\u5411\u91cf\u8fdb\u884c\u4fee\u6539\u4f1a\u5f71\u54cd\u539f\u77e9\u9635\u3002<\/li>\n<\/ul>\n<p><h2>\u4e09\u3001\u4f7f\u7528reshape\u65b9\u6cd5<\/h2>\n<\/p>\n<p><p>\u9664\u4e86<code>flatten<\/code>\u548c<code>ravel<\/code>\u65b9\u6cd5\uff0cNumPy\u8fd8\u63d0\u4f9b\u4e86<code>reshape<\/code>\u65b9\u6cd5\uff0c\u53ef\u4ee5\u5c06\u77e9\u9635\u91cd\u65b0\u5851\u5f62\u4e3a\u4e00\u7ef4\u5411\u91cf\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">import numpy as np<\/p>\n<h2><strong>\u521b\u5efa\u4e00\u4e2a3x3\u77e9\u9635<\/strong><\/h2>\n<p>matrix = np.array([[1, 2, 3],<\/p>\n<p>                   [4, 5, 6],<\/p>\n<p>                   [7, 8, 9]])<\/p>\n<h2><strong>\u4f7f\u7528reshape\u65b9\u6cd5\u5c06\u77e9\u9635\u8f6c\u6362\u4e3a\u5411\u91cf<\/strong><\/h2>\n<p>vector = matrix.reshape(-1)<\/p>\n<p>print(vector)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p><strong>\u4f18\u70b9\uff1a<\/strong><\/p>\n<\/p>\n<ul>\n<li><strong>\u7075\u6d3b<\/strong>\uff1a\u53ef\u4ee5\u5c06\u77e9\u9635\u91cd\u65b0\u5851\u5f62\u4e3a\u4efb\u610f\u5f62\u72b6\u7684\u4e00\u7ef4\u6570\u7ec4\u3002<\/li>\n<li><strong>\u9ad8\u6548<\/strong>\uff1a\u4e0e<code>ravel<\/code>\u7c7b\u4f3c\uff0c\u5982\u679c\u53ef\u80fd\u7684\u8bdd\uff0c\u8fd4\u56de\u7684\u662f\u89c6\u56fe\u3002<\/li>\n<\/ul>\n<p><p><strong>\u7f3a\u70b9\uff1a<\/strong><\/p>\n<\/p>\n<ul>\n<li><strong>\u9700\u8981\u660e\u786e\u6307\u5b9a\u5f62\u72b6<\/strong>\uff1a\u9700\u8981\u77e5\u9053\u76ee\u6807\u5f62\u72b6\uff0c\u5982\u679c\u5f62\u72b6\u4e0d\u5339\u914d\u4f1a\u629b\u51fa\u9519\u8bef\u3002<\/li>\n<\/ul>\n<p><h2>\u56db\u3001\u624b\u52a8\u904d\u5386\u77e9\u9635<\/h2>\n<\/p>\n<p><p>\u867d\u7136NumPy\u63d0\u4f9b\u4e86\u7b80\u4fbf\u7684\u65b9\u6cd5\uff0c\u4f46\u6709\u65f6\u624b\u52a8\u904d\u5386\u77e9\u9635\u5c06\u5176\u8f6c\u5316\u4e3a\u5411\u91cf\u4e5f\u662f\u4e00\u79cd\u9009\u62e9\uff0c\u7279\u522b\u662f\u5728\u4e0d\u4f7f\u7528NumPy\u5e93\u7684\u60c5\u51b5\u4e0b\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\"># \u521b\u5efa\u4e00\u4e2a3x3\u77e9\u9635<\/p>\n<p>matrix = [[1, 2, 3],<\/p>\n<p>          [4, 5, 6],<\/p>\n<p>          [7, 8, 9]]<\/p>\n<h2><strong>\u624b\u52a8\u904d\u5386\u77e9\u9635\u5c06\u5176\u8f6c\u6362\u4e3a\u5411\u91cf<\/strong><\/h2>\n<p>vector = [element for row in matrix for element in row]<\/p>\n<p>print(vector)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p><strong>\u4f18\u70b9\uff1a<\/strong><\/p>\n<\/p>\n<ul>\n<li><strong>\u65e0\u9700\u989d\u5916\u4f9d\u8d56<\/strong>\uff1a\u4e0d\u9700\u8981\u4f9d\u8d56NumPy\u5e93\uff0c\u9002\u7528\u4e8e\u7b80\u5355\u7684\u77e9\u9635\u64cd\u4f5c\u3002<\/li>\n<li><strong>\u7075\u6d3b\u6027\u9ad8<\/strong>\uff1a\u53ef\u4ee5\u6839\u636e\u9700\u6c42\u5b9a\u5236\u904d\u5386\u65b9\u5f0f\u3002<\/li>\n<\/ul>\n<p><p><strong>\u7f3a\u70b9\uff1a<\/strong><\/p>\n<\/p>\n<ul>\n<li><strong>\u4ee3\u7801\u5197\u957f<\/strong>\uff1a\u76f8\u6bd4\u4f7f\u7528NumPy\u7684\u65b9\u6cd5\uff0c\u4ee3\u7801\u663e\u5f97\u5197\u957f\u4e14\u4e0d\u7b80\u6d01\u3002<\/li>\n<li><strong>\u6027\u80fd\u8f83\u4f4e<\/strong>\uff1a\u624b\u52a8\u904d\u5386\u7684\u6027\u80fd\u53ef\u80fd\u4e0d\u5982NumPy\u65b9\u6cd5\u9ad8\u6548\uff0c\u7279\u522b\u662f\u5728\u5927\u77e9\u9635\u7684\u60c5\u51b5\u4e0b\u3002<\/li>\n<\/ul>\n<p><h2>\u4e94\u3001\u4f7f\u7528NumPy\u7684concatenate\u65b9\u6cd5<\/h2>\n<\/p>\n<p><p>NumPy\u7684<code>concatenate<\/code>\u65b9\u6cd5\u53ef\u4ee5\u5c06\u591a\u4e2a\u6570\u7ec4\u5408\u5e76\u4e3a\u4e00\u4e2a\u6570\u7ec4\u3002\u867d\u7136<code>concatenate<\/code>\u65b9\u6cd5\u901a\u5e38\u7528\u4e8e\u5408\u5e76\u591a\u4e2a\u6570\u7ec4\uff0c\u4f46\u4e5f\u53ef\u4ee5\u7528\u4e8e\u5c06\u77e9\u9635\u7684\u5404\u884c\u6216\u5404\u5217\u5408\u5e76\u4e3a\u4e00\u4e2a\u5411\u91cf\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">import numpy as np<\/p>\n<h2><strong>\u521b\u5efa\u4e00\u4e2a3x3\u77e9\u9635<\/strong><\/h2>\n<p>matrix = np.array([[1, 2, 3],<\/p>\n<p>                   [4, 5, 6],<\/p>\n<p>                   [7, 8, 9]])<\/p>\n<h2><strong>\u4f7f\u7528concatenate\u65b9\u6cd5\u5c06\u77e9\u9635\u5404\u884c\u5408\u5e76\u4e3a\u4e00\u4e2a\u5411\u91cf<\/strong><\/h2>\n<p>vector = np.concatenate(matrix)<\/p>\n<p>print(vector)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p><strong>\u4f18\u70b9\uff1a<\/strong><\/p>\n<\/p>\n<ul>\n<li><strong>\u7075\u6d3b<\/strong>\uff1a\u53ef\u4ee5\u5408\u5e76\u591a\u4e2a\u6570\u7ec4\uff0c\u53ef\u4ee5\u6307\u5b9a\u5408\u5e76\u7684\u8f74\u3002<\/li>\n<li><strong>\u9ad8\u6548<\/strong>\uff1aNumPy\u5e95\u5c42\u4f18\u5316\uff0c\u5408\u5e76\u901f\u5ea6\u5feb\u3002<\/li>\n<\/ul>\n<p><p><strong>\u7f3a\u70b9\uff1a<\/strong><\/p>\n<\/p>\n<ul>\n<li><strong>\u4ee3\u7801\u590d\u6742\u5ea6<\/strong>\uff1a\u76f8\u6bd4<code>flatten<\/code>\u548c<code>ravel<\/code>\u65b9\u6cd5\uff0c\u4ee3\u7801\u7a0d\u663e\u590d\u6742\u3002<\/li>\n<\/ul>\n<p><h2>\u516d\u3001\u603b\u7ed3\u4e0e\u5efa\u8bae<\/h2>\n<\/p>\n<p><p>\u5728\u5b9e\u9645\u5e94\u7528\u4e2d\uff0c\u9009\u62e9\u54ea\u79cd\u65b9\u6cd5\u4e3b\u8981\u53d6\u51b3\u4e8e\u5177\u4f53\u9700\u6c42\u548c\u4f7f\u7528\u573a\u666f\u3002<\/p>\n<\/p>\n<ol>\n<li><strong>\u7b80\u5355\u5feb\u901f\u7684\u8f6c\u6362<\/strong>\uff1a\u63a8\u8350\u4f7f\u7528<code>flatten<\/code>\u65b9\u6cd5\uff0c\u4ee3\u7801\u7b80\u6d01\u4e14\u6613\u8bfb\u3002<\/li>\n<li><strong>\u5185\u5b58\u6548\u7387<\/strong>\uff1a\u63a8\u8350\u4f7f\u7528<code>ravel<\/code>\u65b9\u6cd5\uff0c\u5c3d\u53ef\u80fd\u8fd4\u56de\u89c6\u56fe\u8282\u7701\u5185\u5b58\u3002<\/li>\n<li><strong>\u7075\u6d3b\u6027\u9ad8<\/strong>\uff1a<code>reshape<\/code>\u65b9\u6cd5\u548c<code>concatenate<\/code>\u65b9\u6cd5\u63d0\u4f9b\u4e86\u66f4\u591a\u7684\u7075\u6d3b\u6027\uff0c\u53ef\u4ee5\u6839\u636e\u5177\u4f53\u9700\u6c42\u8fdb\u884c\u64cd\u4f5c\u3002<\/li>\n<li><strong>\u65e0NumPy\u4f9d\u8d56<\/strong>\uff1a\u624b\u52a8\u904d\u5386\u9002\u7528\u4e8e\u4e0d\u4f7f\u7528NumPy\u5e93\u7684\u60c5\u51b5\uff0c\u4f46\u4ee3\u7801\u5197\u957f\u4e14\u6027\u80fd\u8f83\u4f4e\u3002<\/li>\n<\/ol>\n<p><p>\u65e0\u8bba\u9009\u62e9\u54ea\u79cd\u65b9\u6cd5\uff0c\u90fd\u9700\u8981\u8003\u8651\u4ee3\u7801\u7684\u53ef\u8bfb\u6027\u3001\u6027\u80fd\u548c\u5185\u5b58\u4f7f\u7528\u60c5\u51b5\u3002NumPy\u5e93\u63d0\u4f9b\u4e86\u4e30\u5bcc\u7684\u77e9\u9635\u64cd\u4f5c\u5de5\u5177\uff0c\u5408\u7406\u4f7f\u7528\u8fd9\u4e9b\u5de5\u5177\u53ef\u4ee5\u5927\u5927\u63d0\u9ad8\u4ee3\u7801\u7684\u6548\u7387\u548c\u7b80\u6d01\u6027\u3002<\/p>\n<\/p>\n<h2><strong>\u76f8\u5173\u95ee\u7b54FAQs\uff1a<\/strong><\/h2>\n<p> <strong>\u5982\u4f55\u5728Python\u4e2d\u5c06\u4e00\u4e2a\u77e9\u9635\u8f6c\u6362\u4e3a\u5411\u91cf\uff1f<\/strong><br \/>\u5728Python\u4e2d\uff0c\u53ef\u4ee5\u4f7f\u7528NumPy\u5e93\u6765\u5c06\u77e9\u9635\u8f6c\u6362\u4e3a\u5411\u91cf\u3002\u901a\u8fc7<code>numpy.ravel()<\/code>\u6216<code>numpy.flatten()<\/code>\u65b9\u6cd5\uff0c\u53ef\u4ee5\u5c06\u591a\u7ef4\u6570\u7ec4\u5c55\u5e73\u4e3a\u4e00\u7ef4\u6570\u7ec4\u3002\u793a\u4f8b\u4ee3\u7801\u5982\u4e0b\uff1a<\/p>\n<pre><code class=\"language-python\">import numpy as np\n\nmatrix = np.array([[1, 2], [3, 4]])\nvector = matrix.ravel()  # \u6216\u8005\u4f7f\u7528 matrix.flatten()\nprint(vector)\n<\/code><\/pre>\n<p><strong>\u5728\u5c06\u77e9\u9635\u8f6c\u6362\u4e3a\u5411\u91cf\u65f6\uff0c\u6709\u54ea\u4e9b\u5e38\u89c1\u7684\u6ce8\u610f\u4e8b\u9879\uff1f<\/strong><br \/>\u5728\u8f6c\u6362\u65f6\u9700\u8981\u6ce8\u610f\u77e9\u9635\u7684\u7ef4\u5ea6\u548c\u6570\u636e\u7c7b\u578b\u3002\u5982\u679c\u77e9\u9635\u5305\u542b\u4e0d\u540c\u6570\u636e\u7c7b\u578b\uff0c\u53ef\u80fd\u4f1a\u5bfc\u81f4\u8f6c\u6362\u540e\u7684\u5411\u91cf\u7c7b\u578b\u4e0d\u4e00\u81f4\u3002\u6b64\u5916\uff0c\u4f7f\u7528<code>ravel()<\/code>\u65f6\u8fd4\u56de\u7684\u662f\u539f\u59cb\u6570\u7ec4\u7684\u89c6\u56fe\uff0c\u800c<code>flatten()<\/code>\u8fd4\u56de\u7684\u662f\u6570\u7ec4\u7684\u526f\u672c\uff0c\u56e0\u6b64\u5728\u5185\u5b58\u4f7f\u7528\u4e0a\u4e5f\u9700\u8981\u6839\u636e\u9700\u6c42\u8fdb\u884c\u9009\u62e9\u3002<\/p>\n<p><strong>\u662f\u5426\u53ef\u4ee5\u4f7f\u7528\u5176\u4ed6\u5e93\u6765\u5b9e\u73b0\u77e9\u9635\u5230\u5411\u91cf\u7684\u8f6c\u6362\uff1f<\/strong><br \/>\u9664\u4e86NumPy\uff0cPandas\u5e93\u4e5f\u53ef\u4ee5\u7528\u4e8e\u7c7b\u4f3c\u7684\u64cd\u4f5c\u3002\u5229\u7528Pandas\u7684DataFrame\uff0c\u53ef\u4ee5\u901a\u8fc7<code>values.flatten()<\/code>\u65b9\u6cd5\u5c06\u6570\u636e\u8f6c\u6362\u4e3a\u4e00\u7ef4\u6570\u7ec4\u3002\u6b64\u5916\uff0cTensorFlow\u548cPyTorch\u7b49\u6df1\u5ea6\u5b66\u4e60\u6846\u67b6\u4e5f\u63d0\u4f9b\u4e86\u7c7b\u4f3c\u7684\u5c55\u5e73\u529f\u80fd\uff0c\u53ef\u4ee5\u6839\u636e\u5177\u4f53\u5e94\u7528\u573a\u666f\u9009\u62e9\u9002\u5408\u7684\u5de5\u5177\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"Python\u4e2d\u5c06\u4e00\u4e2a\u77e9\u9635\u53d8\u6210\u5411\u91cf\u7684\u65b9\u6cd5\u6709\u591a\u79cd\uff0c\u4e3b\u8981\u6709\u4f7f\u7528NumPy\u7684flatten\u65b9\u6cd5\u3001ravel\u65b9\u6cd5\u3001\u4ee5\u53ca\u624b [&hellip;]","protected":false},"author":3,"featured_media":0,"comment_status":"","ping_status":"","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[1],"tags":[],"acf":[],"_links":{"self":[{"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/1139392"}],"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=1139392"}],"version-history":[{"count":0,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/1139392\/revisions"}],"wp:attachment":[{"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media?parent=1139392"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/categories?post=1139392"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/tags?post=1139392"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}