{"id":1021001,"date":"2024-12-27T13:18:00","date_gmt":"2024-12-27T05:18:00","guid":{"rendered":"https:\/\/docs.pingcode.com\/ask\/ask-ask\/1021001.html"},"modified":"2024-12-27T13:18:16","modified_gmt":"2024-12-27T05:18:16","slug":"python%e9%9a%8f%e6%9c%ba%e5%b0%8f%e6%95%b0%e5%a6%82%e4%bd%95%e7%94%9f%e6%88%90","status":"publish","type":"post","link":"https:\/\/docs.pingcode.com\/ask\/1021001.html","title":{"rendered":"python\u968f\u673a\u5c0f\u6570\u5982\u4f55\u751f\u6210"},"content":{"rendered":"<p style=\"text-align:center;\" ><img decoding=\"async\" src=\"https:\/\/cdn-kb.worktile.com\/kb\/wp-content\/uploads\/2024\/04\/25163335\/98f672d5-23eb-4ec1-8894-adb0e05edb4c.webp\" alt=\"python\u968f\u673a\u5c0f\u6570\u5982\u4f55\u751f\u6210\" \/><\/p>\n<p><p> \u8981\u751f\u6210Python\u968f\u673a\u5c0f\u6570\uff0c\u53ef\u4ee5\u4f7f\u7528\u591a\u79cd\u65b9\u6cd5\uff0c<strong>\u5305\u62ec\u4f7f\u7528random\u6a21\u5757\u751f\u6210\u5747\u5300\u5206\u5e03\u7684\u968f\u673a\u6570\u3001\u5229\u7528numpy\u5e93\u751f\u6210\u4e0d\u540c\u5206\u5e03\u7684\u968f\u673a\u6570\u3001\u4ee5\u53ca\u81ea\u5b9a\u4e49\u51fd\u6570\u751f\u6210\u7279\u5b9a\u8303\u56f4\u548c\u7cbe\u5ea6\u7684\u968f\u673a\u5c0f\u6570<\/strong>\u3002\u5176\u4e2d\uff0c\u4f7f\u7528random\u6a21\u5757\u662f\u6700\u5e38\u89c1\u7684\u65b9\u6cd5\uff0c\u56e0\u4e3a\u5b83\u76f4\u63a5\u63d0\u4f9b\u4e86\u751f\u6210\u968f\u673a\u5c0f\u6570\u7684\u51fd\u6570\uff0c\u5982<code>random.uniform()<\/code>\u548c<code>random.random()<\/code>\u3002<code>random.uniform()<\/code>\u7528\u4e8e\u751f\u6210\u6307\u5b9a\u8303\u56f4\u5185\u7684\u968f\u673a\u5c0f\u6570\uff0c\u800c<code>random.random()<\/code>\u5219\u751f\u62100\u52301\u4e4b\u95f4\u7684\u968f\u673a\u5c0f\u6570\u3002\u4e0b\u9762\u8be6\u7ec6\u4ecb\u7ecd\u5982\u4f55\u4f7f\u7528\u8fd9\u4e9b\u65b9\u6cd5\u751f\u6210\u968f\u673a\u5c0f\u6570\u3002<\/p>\n<\/p>\n<p><p>\u4e00\u3001\u4f7f\u7528random\u6a21\u5757<\/p>\n<\/p>\n<p><p>Python\u7684random\u6a21\u5757\u662f\u751f\u6210\u968f\u673a\u6570\u6700\u7b80\u5355\u4e14\u5e38\u7528\u7684\u5de5\u5177\u3002\u5b83\u63d0\u4f9b\u4e86\u4e30\u5bcc\u7684\u51fd\u6570\u7528\u4e8e\u751f\u6210\u4e0d\u540c\u7c7b\u578b\u7684\u968f\u673a\u6570\u3002\u751f\u6210\u968f\u673a\u5c0f\u6570\u65f6\uff0c\u6700\u5e38\u7528\u7684\u4e24\u4e2a\u51fd\u6570\u662f<code>random.random()<\/code>\u548c<code>random.uniform(a, b)<\/code>\u3002<\/p>\n<\/p>\n<ol>\n<li><strong>random.random()<\/strong><\/li>\n<\/ol>\n<p><p><code>random.random()<\/code>\u51fd\u6570\u7528\u4e8e\u751f\u6210\u4e00\u4e2a\u5728[0.0, 1.0)\u8303\u56f4\u5185\u7684\u968f\u673a\u5c0f\u6570\u3002\u8fd9\u4e2a\u51fd\u6570\u4e0d\u9700\u8981\u53c2\u6570\uff0c\u8fd4\u56de\u503c\u662f\u4e00\u4e2a\u6d6e\u70b9\u6570\uff0c\u8868\u793a\u5728\u8be5\u8303\u56f4\u5185\u7684\u968f\u673a\u6570\u3002\u7531\u4e8e\u5176\u751f\u6210\u7684\u6570\u57280\u548c1\u4e4b\u95f4\uff0c\u5b83\u5e38\u7528\u4e8e\u9700\u8981\u968f\u673a\u6982\u7387\u7684\u573a\u5408\u3002\u6bd4\u5982\u5728\u6a21\u62df\u5b9e\u9a8c\u4e2d\uff0c\u968f\u673a\u9009\u62e9\u4e00\u4e2a\u4e8b\u4ef6\u53d1\u751f\u6216\u4e0d\u53d1\u751f\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">import random<\/p>\n<p>random_number = random.random()<\/p>\n<p>print(f&quot;Random number between 0 and 1: {random_number}&quot;)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<ol start=\"2\">\n<li><strong>random.uniform(a, b)<\/strong><\/li>\n<\/ol>\n<p><p>\u5982\u679c\u9700\u8981\u5728\u7279\u5b9a\u8303\u56f4\u5185\u751f\u6210\u968f\u673a\u5c0f\u6570\uff0c\u53ef\u4ee5\u4f7f\u7528<code>random.uniform(a, b)<\/code>\u3002\u5b83\u751f\u6210\u7684\u968f\u673a\u5c0f\u6570\u5728[a, b]\u4e4b\u95f4\uff0c\u5305\u542ba\u548cb\u3002\u8fd9\u5728\u9700\u8981\u751f\u6210\u7279\u5b9a\u8303\u56f4\u5185\u7684\u6570\u503c\u65f6\u7279\u522b\u6709\u7528\u3002\u6bd4\u5982\u5728\u6e38\u620f\u4e2d\u968f\u673a\u751f\u6210\u4e00\u4e2a\u7269\u54c1\u7684\u5c5e\u6027\u503c\uff0c\u6216\u8005\u5728\u7269\u7406\u6a21\u62df\u4e2d\u8bbe\u7f6e\u968f\u673a\u7684\u521d\u59cb\u6761\u4ef6\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">import random<\/p>\n<p>random_number = random.uniform(10.5, 20.5)<\/p>\n<p>print(f&quot;Random number between 10.5 and 20.5: {random_number}&quot;)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u4e8c\u3001\u4f7f\u7528numpy\u5e93<\/p>\n<\/p>\n<p><p>Numpy\u662f\u4e00\u4e2a\u5f3a\u5927\u7684\u79d1\u5b66\u8ba1\u7b97\u5e93\uff0c\u5b83\u63d0\u4f9b\u4e86\u66f4\u591a\u751f\u6210\u968f\u673a\u6570\u7684\u9009\u9879\uff0c\u5c24\u5176\u662f\u5728\u751f\u6210\u5927\u89c4\u6a21\u6570\u636e\u96c6\u6216\u9700\u8981\u7b26\u5408\u7279\u5b9a\u5206\u5e03\u7684\u968f\u673a\u6570\u65f6\u975e\u5e38\u6709\u7528\u3002numpy.random\u6a21\u5757\u63d0\u4f9b\u4e86\u5404\u79cd\u51fd\u6570\u6765\u751f\u6210\u4e0d\u540c\u5206\u5e03\u7684\u968f\u673a\u6570\u3002<\/p>\n<\/p>\n<ol>\n<li><strong>numpy.random.rand()<\/strong><\/li>\n<\/ol>\n<p><p><code>numpy.random.rand()<\/code>\u7528\u4e8e\u751f\u6210\u6307\u5b9a\u5f62\u72b6\u7684\u6570\u7ec4\uff0c\u6570\u7ec4\u4e2d\u7684\u503c\u4e3a[0, 1)\u5185\u7684\u968f\u673a\u5c0f\u6570\u3002\u8fd9\u4e2a\u51fd\u6570\u975e\u5e38\u9002\u5408\u9700\u8981\u4e00\u6b21\u751f\u6210\u591a\u4e2a\u968f\u673a\u6570\u7684\u60c5\u51b5\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">import numpy as np<\/p>\n<p>random_array = np.random.rand(5)<\/p>\n<p>print(f&quot;Random array of 5 elements: {random_array}&quot;)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<ol start=\"2\">\n<li><strong>numpy.random.uniform(low, high, size)<\/strong><\/li>\n<\/ol>\n<p><p>\u7c7b\u4f3c\u4e8e<code>random.uniform(a, b)<\/code>\uff0c\u4f46\u53ef\u4ee5\u751f\u6210\u4efb\u610f\u5f62\u72b6\u7684\u6570\u7ec4\uff0c\u5e76\u4e14\u6548\u7387\u66f4\u9ad8\u3002<code>numpy.random.uniform(low, high, size)<\/code>\u751f\u6210\u5728[low, high)\u8303\u56f4\u5185\u7684\u968f\u673a\u5c0f\u6570\uff0c<code>size<\/code>\u53c2\u6570\u6307\u5b9a\u8f93\u51fa\u7684\u5f62\u72b6\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">import numpy as np<\/p>\n<p>random_array = np.random.uniform(5.0, 10.0, size=(3, 3))<\/p>\n<p>print(f&quot;3x3 array of random numbers between 5.0 and 10.0:\\n{random_array}&quot;)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u4e09\u3001\u81ea\u5b9a\u4e49\u51fd\u6570\u751f\u6210\u968f\u673a\u5c0f\u6570<\/p>\n<\/p>\n<p><p>\u5728\u67d0\u4e9b\u60c5\u51b5\u4e0b\uff0c\u53ef\u80fd\u9700\u8981\u751f\u6210\u6ee1\u8db3\u7279\u5b9a\u6761\u4ef6\u7684\u968f\u673a\u5c0f\u6570\uff0c\u6bd4\u5982\u5177\u6709\u7279\u5b9a\u7cbe\u5ea6\u6216\u8005\u4f9d\u7167\u67d0\u79cd\u81ea\u5b9a\u4e49\u89c4\u5219\u751f\u6210\u3002\u53ef\u4ee5\u901a\u8fc7\u81ea\u5b9a\u4e49\u51fd\u6570\u5b9e\u73b0\u8fd9\u4e9b\u9700\u6c42\u3002<\/p>\n<\/p>\n<ol>\n<li><strong>\u751f\u6210\u7279\u5b9a\u7cbe\u5ea6\u7684\u5c0f\u6570<\/strong><\/li>\n<\/ol>\n<p><p>\u53ef\u4ee5\u901a\u8fc7\u8c03\u6574\u751f\u6210\u7684\u5c0f\u6570\u4f4d\u6570\u6765\u63a7\u5236\u968f\u673a\u6570\u7684\u7cbe\u5ea6\u3002\u901a\u5e38\uff0c\u8fd9\u53ef\u4ee5\u901a\u8fc7\u4e58\u6cd5\u548c\u9664\u6cd5\u6765\u5b9e\u73b0\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">import random<\/p>\n<p>def generate_random_with_precision(a, b, precision):<\/p>\n<p>    scale = 10  precision<\/p>\n<p>    return random.uniform(a * scale, b * scale) \/ scale<\/p>\n<p>random_number = generate_random_with_precision(1.0, 2.0, 3)<\/p>\n<p>print(f&quot;Random number between 1.0 and 2.0 with 3 decimal places: {random_number}&quot;)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<ol start=\"2\">\n<li><strong>\u751f\u6210\u7279\u5b9a\u6761\u4ef6\u7684\u5c0f\u6570<\/strong><\/li>\n<\/ol>\n<p><p>\u53ef\u4ee5\u7f16\u5199\u81ea\u5b9a\u4e49\u51fd\u6570\u6765\u751f\u6210\u6ee1\u8db3\u7279\u5b9a\u6761\u4ef6\u7684\u968f\u673a\u5c0f\u6570\u3002\u4f8b\u5982\uff0c\u751f\u6210\u4e00\u4e2a\u7b26\u5408\u67d0\u79cd\u81ea\u5b9a\u4e49\u5206\u5e03\u6216\u8005\u7279\u5b9a\u6a21\u5f0f\u7684\u968f\u673a\u6570\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">import random<\/p>\n<p>def generate_custom_random(a, b):<\/p>\n<p>    # \u81ea\u5b9a\u4e49\u903b\u8f91\uff0c\u793a\u4f8b\u4e2d\u7b80\u5355\u5730\u9009\u62e9\u4e2d\u95f4\u70b9\u9644\u8fd1\u7684\u968f\u673a\u6570<\/p>\n<p>    midpoint = (a + b) \/ 2<\/p>\n<p>    return random.uniform(midpoint - 1, midpoint + 1)<\/p>\n<p>random_number = generate_custom_random(10.0, 20.0)<\/p>\n<p>print(f&quot;Custom random number between 10.0 and 20.0: {random_number}&quot;)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u56db\u3001\u751f\u6210\u7b26\u5408\u7279\u5b9a\u5206\u5e03\u7684\u968f\u673a\u5c0f\u6570<\/p>\n<\/p>\n<p><p>\u5728\u67d0\u4e9b\u5e94\u7528\u4e2d\uff0c\u6bd4\u5982\u6a21\u62df\u6216\u7edf\u8ba1\u5206\u6790\u4e2d\uff0c\u9700\u8981\u751f\u6210\u7b26\u5408\u67d0\u4e9b\u7edf\u8ba1\u5206\u5e03\u7684\u968f\u673a\u5c0f\u6570\u3002Numpy\u5e93\u63d0\u4f9b\u4e86\u751f\u6210\u5e38\u89c1\u5206\u5e03\u7684\u968f\u673a\u6570\u7684\u529f\u80fd\u3002<\/p>\n<\/p>\n<ol>\n<li><strong>\u6b63\u6001\u5206\u5e03<\/strong><\/li>\n<\/ol>\n<p><p>\u6b63\u6001\u5206\u5e03\uff08\u4e5f\u79f0\u4e3a\u9ad8\u65af\u5206\u5e03\uff09\u662f\u6700\u5e38\u89c1\u7684\u6982\u7387\u5206\u5e03\u4e4b\u4e00\u3002\u53ef\u4ee5\u4f7f\u7528<code>numpy.random.normal(loc, scale, size)<\/code>\u751f\u6210\u7b26\u5408\u6b63\u6001\u5206\u5e03\u7684\u968f\u673a\u5c0f\u6570\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">import numpy as np<\/p>\n<p>normal_array = np.random.normal(loc=0.0, scale=1.0, size=10)<\/p>\n<p>print(f&quot;Array of 10 random numbers from a normal distribution:\\n{normal_array}&quot;)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<ol start=\"2\">\n<li><strong>\u6307\u6570\u5206\u5e03<\/strong><\/li>\n<\/ol>\n<p><p>\u6307\u6570\u5206\u5e03\u7528\u4e8e\u63cf\u8ff0\u4e8b\u4ef6\u4e4b\u95f4\u7684\u65f6\u95f4\u95f4\u9694\uff0c\u53ef\u4ee5\u901a\u8fc7<code>numpy.random.exponential(scale, size)<\/code>\u751f\u6210\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">import numpy as np<\/p>\n<p>exponential_array = np.random.exponential(scale=1.0, size=10)<\/p>\n<p>print(f&quot;Array of 10 random numbers from an exponential distribution:\\n{exponential_array}&quot;)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u4e94\u3001\u968f\u673a\u79cd\u5b50\u548c\u53ef\u91cd\u590d\u6027<\/p>\n<\/p>\n<p><p>\u4e3a\u4e86\u786e\u4fdd\u968f\u673a\u6570\u751f\u6210\u7684\u53ef\u91cd\u590d\u6027\uff0c\u5c24\u5176\u662f\u5728\u6d4b\u8bd5\u548c\u8c03\u8bd5\u65f6\uff0c\u53ef\u4ee5\u4f7f\u7528\u968f\u673a\u79cd\u5b50\u3002\u79cd\u5b50\u662f\u968f\u673a\u6570\u751f\u6210\u5668\u7684\u8d77\u70b9\uff0c\u901a\u8fc7\u8bbe\u7f6e\u76f8\u540c\u7684\u79cd\u5b50\u53ef\u4ee5\u786e\u4fdd\u6bcf\u6b21\u751f\u6210\u7684\u968f\u673a\u6570\u5e8f\u5217\u76f8\u540c\u3002<\/p>\n<\/p>\n<ol>\n<li><strong>\u8bbe\u7f6e\u968f\u673a\u79cd\u5b50<\/strong><\/li>\n<\/ol>\n<p><p>\u53ef\u4ee5\u901a\u8fc7<code>random.seed()<\/code>\u6216<code>numpy.random.seed()<\/code>\u8bbe\u7f6e\u968f\u673a\u6570\u751f\u6210\u5668\u7684\u79cd\u5b50\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">import random<\/p>\n<p>import numpy as np<\/p>\n<p>random.seed(42)<\/p>\n<p>print(f&quot;Random number with seed 42: {random.random()}&quot;)<\/p>\n<p>np.random.seed(42)<\/p>\n<p>print(f&quot;Random number from numpy with seed 42: {np.random.rand()}&quot;)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u516d\u3001\u603b\u7ed3<\/p>\n<\/p>\n<p><p>\u751f\u6210\u968f\u673a\u5c0f\u6570\u5728\u8bb8\u591a\u9886\u57df\u4e2d\u90fd\u6709\u91cd\u8981\u5e94\u7528\uff0c\u4ece\u7b80\u5355\u7684\u6a21\u62df\u5b9e\u9a8c\u5230\u590d\u6742\u7684\u7edf\u8ba1\u5206\u6790\u3002Python\u63d0\u4f9b\u4e86\u591a\u79cd\u65b9\u5f0f\u6765\u751f\u6210\u968f\u673a\u5c0f\u6570\uff0c\u5305\u62ec\u4f7f\u7528random\u6a21\u5757\u3001numpy\u5e93\u4ee5\u53ca\u81ea\u5b9a\u4e49\u51fd\u6570\u7b49\u3002\u65e0\u8bba\u662f\u9700\u8981\u7b80\u5355\u7684\u5747\u5300\u5206\u5e03\u968f\u673a\u6570\uff0c\u8fd8\u662f\u590d\u6742\u7684\u7b26\u5408\u7279\u5b9a\u5206\u5e03\u7684\u968f\u673a\u6570\uff0cPython\u90fd\u80fd\u63d0\u4f9b\u76f8\u5e94\u7684\u5de5\u5177\u3002\u6b64\u5916\uff0c\u901a\u8fc7\u8bbe\u7f6e\u968f\u673a\u79cd\u5b50\uff0c\u53ef\u4ee5\u5b9e\u73b0\u968f\u673a\u6570\u751f\u6210\u7684\u53ef\u91cd\u590d\u6027\uff0c\u8fd9\u5bf9\u4e8e\u8c03\u8bd5\u548c\u9a8c\u8bc1\u7b97\u6cd5\u5c24\u4e3a\u91cd\u8981\u3002<\/p>\n<\/p>\n<h2><strong>\u76f8\u5173\u95ee\u7b54FAQs\uff1a<\/strong><\/h2>\n<p> <strong>\u5982\u4f55\u5728Python\u4e2d\u751f\u6210\u4e00\u4e2a\u8303\u56f4\u5185\u7684\u968f\u673a\u5c0f\u6570\uff1f<\/strong><br \/>\u5728Python\u4e2d\uff0c\u53ef\u4ee5\u4f7f\u7528<code>random<\/code>\u6a21\u5757\u4e2d\u7684<code>uniform(a, b)<\/code>\u51fd\u6570\u6765\u751f\u6210\u6307\u5b9a\u8303\u56f4\u5185\u7684\u968f\u673a\u5c0f\u6570\u3002\u8be5\u51fd\u6570\u63a5\u53d7\u4e24\u4e2a\u53c2\u6570\uff0c\u5206\u522b\u662f\u751f\u6210\u968f\u673a\u6570\u7684\u4e0b\u9650\u548c\u4e0a\u9650\uff0c\u4f8b\u5982\uff0c<code>random.uniform(1.0, 10.0)<\/code>\u5c06\u8fd4\u56de\u4e00\u4e2a\u57281.0\u523010.0\u4e4b\u95f4\u7684\u968f\u673a\u5c0f\u6570\u3002<\/p>\n<p><strong>Python\u4e2d\u751f\u6210\u968f\u673a\u5c0f\u6570\u7684\u7cbe\u786e\u5ea6\u5982\u4f55\u63a7\u5236\uff1f<\/strong><br \/>\u53ef\u4ee5\u901a\u8fc7<code>round()<\/code>\u51fd\u6570\u6765\u63a7\u5236\u751f\u6210\u7684\u968f\u673a\u5c0f\u6570\u7684\u7cbe\u786e\u5ea6\u3002\u4f8b\u5982\uff0c\u5982\u679c\u9700\u8981\u751f\u6210\u4e00\u4e2a\u968f\u673a\u5c0f\u6570\u5e76\u4fdd\u7559\u4e24\u4f4d\u5c0f\u6570\uff0c\u53ef\u4ee5\u7ed3\u5408<code>round()<\/code>\u51fd\u6570\u4f7f\u7528\uff0c\u5982<code>round(random.uniform(1.0, 10.0), 2)<\/code>\uff0c\u8fd9\u5c06\u8fd4\u56de\u4e00\u4e2a\u4fdd\u7559\u4e24\u4f4d\u5c0f\u6570\u7684\u968f\u673a\u6570\u3002<\/p>\n<p><strong>\u6709\u4ec0\u4e48\u65b9\u6cd5\u53ef\u4ee5\u751f\u6210\u591a\u4e2a\u968f\u673a\u5c0f\u6570\u800c\u4e0d\u662f\u5355\u4e2a\uff1f<\/strong><br \/>\u4f7f\u7528\u5217\u8868\u63a8\u5bfc\u5f0f\u53ef\u4ee5\u8f7b\u677e\u751f\u6210\u591a\u4e2a\u968f\u673a\u5c0f\u6570\u3002\u4f8b\u5982\uff0c\u53ef\u4ee5\u4f7f\u7528<code>[random.uniform(1.0, 10.0) for _ in range(5)]<\/code>\u6765\u751f\u6210\u4e00\u4e2a\u5305\u542b5\u4e2a\u57281.0\u523010.0\u4e4b\u95f4\u7684\u968f\u673a\u5c0f\u6570\u7684\u5217\u8868\u3002\u8fd9\u79cd\u65b9\u6cd5\u4e0d\u4ec5\u7b80\u5355\uff0c\u800c\u4e14\u80fd\u591f\u5feb\u901f\u751f\u6210\u6240\u9700\u6570\u91cf\u7684\u968f\u673a\u5c0f\u6570\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"\u8981\u751f\u6210Python\u968f\u673a\u5c0f\u6570\uff0c\u53ef\u4ee5\u4f7f\u7528\u591a\u79cd\u65b9\u6cd5\uff0c\u5305\u62ec\u4f7f\u7528random\u6a21\u5757\u751f\u6210\u5747\u5300\u5206\u5e03\u7684\u968f\u673a\u6570\u3001\u5229\u7528numpy\u5e93\u751f [&hellip;]","protected":false},"author":3,"featured_media":1021023,"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\/1021001"}],"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=1021001"}],"version-history":[{"count":"1","href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/1021001\/revisions"}],"predecessor-version":[{"id":1021028,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/1021001\/revisions\/1021028"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media\/1021023"}],"wp:attachment":[{"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media?parent=1021001"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/categories?post=1021001"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/tags?post=1021001"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}