{"id":38885,"date":"2025-05-21T17:37:58","date_gmt":"2025-05-21T09:37:58","guid":{"rendered":"https:\/\/www.wsisp.com\/helps\/38885.html"},"modified":"2025-05-21T17:37:58","modified_gmt":"2025-05-21T09:37:58","slug":"python-day26-%e5%ad%a6%e4%b9%a0","status":"publish","type":"post","link":"https:\/\/www.wsisp.com\/helps\/38885.html","title":{"rendered":"Python Day26 \u5b66\u4e60"},"content":{"rendered":"<p>\u7ee7\u7eedNumPy\u7684\u5b66\u4e60<\/p>\n<h2>\u6570\u7ec4\u7684\u7d22\u5f15<\/h2>\n<h3><span style=\"color:#1a439c\">\u4e00\u7ef4\u6570\u7ec4\u7684\u7d22\u5f15<\/span><\/h3>\n<p><span style=\"color:#0d0016\">\u521b\u5efa\u53ca\u8f93\u51fa<\/span><\/p>\n<p>arr1d &#061; np.arange(10)  # \u6570\u7ec4: [0 1 2 3 4 5 6 7 8 9]<br \/>\narr1d<br \/>\narray([0, 1, 2, 3, 4, 5, 6, 7, 8, 9]) <\/p>\n<h4><span style=\"color:#1c7331\">\u53d6\u51fa\u6570\u7ec4\u7684\u7b2c\u4e00\u4e2a\u5143\u7d20&#xff0c;\u6700\u540e\u4e00\u4e2a\u5143\u7d20<\/span><\/h4>\n<p><span style=\"color:#0d0016\"><span style=\"background-color:#cbe0f1\">\u4ee3\u7801\u5b9e\u73b0<\/span><\/span><\/p>\n<p>arr1d[0]<br \/>\narr1d[-1] <\/p>\n<h4><span style=\"color:#1c7331\">\u53d6\u51fa\u6570\u7ec4\u4e2d\u7d22\u5f15\u4e3a3&#xff0c;5&#xff0c;8\u7684\u5143\u7d20<\/span><\/h4>\n<p><span style=\"color:#fe2c24\">\u4f7f\u7528\u6574\u6570\u6570\u7ec4\u8fdb\u884c\u7d22\u5f15&#xff0c;\u53ef\u4ee5\u4e00\u6b21\u6027\u53d6\u51fa\u591a\u4e2a\u5143\u7d20\u3002\u8bed\u6cd5\u662f arr1d[[index1, index2, &#8230;]]\u3002<\/span><\/p>\n<p><span style=\"color:#0d0016\"><span style=\"background-color:#cbe0f1\">\u4ee3\u7801\u5b9e\u73b0<\/span><\/span><\/p>\n<p>arr1d[[3, 5, 8]] <\/p>\n<p><span style=\"background-color:#d4e9d5\">\u8f93\u51fa&#xff1a;<\/span><\/p>\n<p>array([3, 5, 8]) <\/p>\n<h4><span style=\"color:#1c7331\">\u5207\u7247\u7d22\u5f15<\/span><\/h4>\n<p>arr1d[2:6] # \u53d6\u51fa\u7d22\u5f15\u4e3a2\u52305\u7684\u5143\u7d20&#xff08;\u4e0d\u5305\u62ec\u7d22\u5f156\u7684\u5143\u7d20&#xff0c;\u53d6\u5de6\u4e0d\u53d6\u53f3&#xff09;<br \/>\n\u6253\u5370\u7ed3\u679c&#xff1a;array([2, 3, 4, 5])<\/p>\n<p># \u53d6\u51fa\u6570\u7ec4\u4e2d\u4ece\u5934\u5230\u7d22\u5f15 5 (\u4e0d\u5305\u542b 5) \u7684\u5143\u7d20\u3002<br \/>\n# \u4f7f\u7528\u5207\u7247 slice [:stop]<br \/>\narr1d[:5]<br \/>\n\u6253\u5370\u7ed3\u679c&#xff1a;array([0, 1, 2, 3, 4])<\/p>\n<p># \u53d6\u51fa\u6570\u7ec4\u4e2d\u4ece\u7d22\u5f15 4 \u5230\u7ed3\u5c3e\u7684\u5143\u7d20\u3002<br \/>\n# \u4f7f\u7528\u5207\u7247 slice [start:]<br \/>\narr1d[4:]<br \/>\n\u6253\u5370\u7ed3\u679c&#xff1a;array([4, 5, 6, 7, 8, 9])<\/p>\n<p># \u53d6\u51fa\u5168\u90e8\u5143\u7d20<br \/>\narr1d[:]<br \/>\n\u6253\u5370\u7ed3\u679c&#xff1a;array([0, 1, 2, 3, 4, 5, 6, 7, 8, 9])<\/p>\n<p># 7\u53d6\u51fa\u6570\u7ec4\u4e2d\u6240\u6709\u5076\u6570\u7d22\u5f15\u5bf9\u5e94\u7684\u5143\u7d20 (\u5373\u7d22\u5f15 0, 2, 4, 6, 8)\u3002<br \/>\n# \u4f7f\u7528\u5e26\u6b65\u957f\u7684\u5207\u7247 slice [start:stop:step]<br \/>\narr1d[::2]<br \/>\n\u6253\u5370\u7ed3\u679c&#xff1a;array([0, 2, 4, 6, 8]) <\/p>\n<p><span style=\"color:#fe2c24\">\u6ce8&#xff1a;\u53d6\u51fa\u6570\u7ec4\u4e2d\u6240\u6709\u5076\u6570\u7d22\u5f15\u5bf9\u5e94\u7684\u5143\u7d20<\/span><\/p>\n<p><span style=\"color:#fe2c24\">\u8fd9\u91cc\u4ee3\u7801\u4e2d\u7684\u201c2\u201d\u4ee3\u8868\u7684\u5c31\u662f\u6b65\u957f&#xff0c;\u5373\u6bcf\u9694\u4e00\u4e2a\u5143\u7d20\u53d6\u4e00\u6b21\u3002<\/span><\/p>\n<h3><span style=\"color:#1a439c\">\u4e8c\u7ef4\u6570\u7ec4\u7684\u7d22\u5f15<\/span><\/h3>\n<p><span style=\"color:#0d0016\">\u521b\u5efa\u53ca\u8f93\u51fa<\/span><\/p>\n<p># \u6570\u7ec4:<br \/>\narr2d &#061; np.array([[1, 2, 3, 4],<br \/>\n                  [5, 6, 7, 8],<br \/>\n                  [9, 10, 11, 12],<br \/>\n                  [13, 14, 15, 16]])<br \/>\narr2d<br \/>\narray([[ 1,  2,  3,  4],<br \/>\n       [ 5,  6,  7,  8],<br \/>\n       [ 9, 10, 11, 12],<br \/>\n       [13, 14, 15, 16]]) <\/p>\n<p><span style=\"color:#fe2c24\">\u7d22\u5f15\u987a\u5e8f&#xff1a;\u5728\u4e8c\u7ef4\u6570\u7ec4\u4e2d&#xff0c;\u7b2c\u4e00\u4e2a\u7d22\u5f15\u503c\u4ee3\u8868\u884c&#xff0c;\u7b2c\u4e8c\u4e2a\u4ee3\u8868\u5217\u3002\u6bd4\u5982arr2d[i,j], \u8fd9\u91cci\u4ee3\u8868\u884c\u7d22\u5f15&#xff0c;j\u4ee3\u8868\u5217\u7d22\u5f15\u3002<\/span><\/p>\n<p><span style=\"color:#0d0016\"><span style=\"background-color:#cbe0f1\">\u4ee3\u7801\u5b9e\u73b0&#xff1a;<\/span><\/span><\/p>\n<h4><span style=\"color:#1c7331\">\u53d6\u51fa\u7b2c1\u884c&#xff08;\u7d22\u5f15\u4e3a1&#xff09;\u7684\u6240\u6709\u5143\u7d20<\/span><\/h4>\n<p># \u4f7f\u7528\u7d22\u5f15 arr[row_index, :] \u6216 arr[row_index]<br \/>\narr2d[1, :]<br \/>\n# \u4e5f\u53ef\u4ee5\u7701\u7565\u540e\u9762\u7684 :<br \/>\narr2d[1]<br \/>\n\u6253\u5370\u7ed3\u679c&#xff1a;array([5, 6, 7, 8]) <\/p>\n<p><span style=\"background-color:#f9eda6\">\u4ee3\u7801\u89e3\u91ca&#xff1a;<\/span><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"444\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/05\/20250521093757-682d9ef5308af.png\" width=\"550\" \/><\/p>\n<h4><span style=\"color:#1c7331\">\u53d6\u51fa\u7b2c2\u5217\u7684\u6240\u6709\u5143\u7d20<\/span><\/h4>\n<p><span style=\"color:#0d0016\"><span style=\"background-color:#cbe0f1\">\u4ee3\u7801\u5b9e\u73b0&#xff1a;<\/span><\/span><\/p>\n<p># \u4f7f\u7528\u7d22\u5f15 arr[:, column_index]<br \/>\narr2d[:, 2]<\/p>\n<p>\u6253\u5370\u7ed3\u679c&#xff1a;array([ 3,  7, 11, 15]) <\/p>\n<h4><span style=\"color:#1c7331\">\u53d6\u51fa\u4f4d\u4e8e\u7b2c2\u884c\u7b2c3\u5217\u7684\u5143\u7d20<\/span><\/h4>\n<p># \u4f7f\u7528 arr[row_index, column_index]<br \/>\narr2d[2, 3]<\/p>\n<p>\u6253\u5370\u7ed3\u679c&#xff1a;12 <\/p>\n<p><span style=\"color:#fe2c24\">\u6ce8\u610f&#xff1a;\u7d22\u5f15\u4ece0\u5f00\u59cb&#xff0c;\u884c\u7d22\u5f15\u4e3a2&#xff0c;\u5b9e\u9645\u4e3a\u7b2c3\u884c&#xff1b;\u5217\u7d22\u5f15\u4e3a3&#xff0c;\u5b9e\u9645\u4e3a\u7b2c4\u5217<\/span><\/p>\n<h4><span style=\"color:#1c7331\">\u53d6\u51fa\u65b0\u6570\u7ec4<\/span><\/h4>\n<p># \u53d6\u51fa\u7531\u7b2c 0 \u884c\u548c\u7b2c 2 \u884c\u7ec4\u6210\u7684\u65b0\u6570\u7ec4\u3002<br \/>\n# \u4f7f\u7528\u6574\u6570\u6570\u7ec4\u4f5c\u4e3a\u884c\u7d22\u5f15 arr[[row1, row2, &#8230;], :]<br \/>\narr2d[[0, 2], :]<\/p>\n<p>\u6253\u5370\u7ed3\u679c&#xff1a;array([[ 1,  2,  3,  4],<br \/>\n                [ 9, 10, 11, 12]])<br \/>\n# \u53d6\u51fa\u7531\u7b2c 1 \u5217\u548c\u7b2c 3 \u5217\u7ec4\u6210\u7684\u65b0\u6570\u7ec4\u3002<br \/>\n# \u4f7f\u7528\u6574\u6570\u6570\u7ec4\u4f5c\u4e3a\u5217\u7d22\u5f15 arr[:, [col1, col2, &#8230;]]<br \/>\narr2d[:, [1, 3]]<\/p>\n<p>\u6253\u5370\u7ed3\u679c&#xff1a;array([[ 2,  4],<br \/>\n                [ 6,  8],<br \/>\n                [10, 12],<br \/>\n                [14, 16]]) <\/p>\n<h4><span style=\"color:#1c7331\">\u53d6\u51fa\u5b50\u77e9\u9635<\/span><\/h4>\n<p># \u53d6\u51fa\u4e00\u4e2a 2&#215;2 \u7684\u5b50\u77e9\u9635&#xff0c;\u5305\u542b\u5143\u7d20 6, 7, 10, 11\u3002<br \/>\n# \u4f7f\u7528\u5207\u7247 slice arr[row_start:row_stop, col_start:col_stop]<br \/>\narr2d[1:3, 1:3]<\/p>\n<p>\u6253\u5370\u7ed3\u679c&#xff1a;array([[ 6,  7],<br \/>\n                [10, 11]]) <\/p>\n<p><span style=\"color:#fe2c24\">\u6ce8\u610f&#xff1a;\u7262\u8bb0\u201c\u5de6\u53d6\u53f3\u4e0d\u53d6\u201d\u3002\u56e0\u800c\u8fd9\u91cc\u53d6\u7684\u662f\u7b2c1,2\u884c\u548c\u7b2c1,2\u5217\u7684\u77e9\u9635\u3002<\/span><\/p>\n<h2><span style=\"color:#1a439c\">\u4e09\u7ef4\u6570\u7ec4\u7684\u7d22\u5f15<\/span><\/h2>\n<p>\u521b\u5efa\u4e0e\u8f93\u51fa<\/p>\n<p>arr3d &#061; np.arange(3 * 4 * 5).reshape((3, 4, 5))<br \/>\narr3d <\/p>\n<p>\u6253\u5370\u7ed3\u679c&#xff1a;array([[[ 0,  1,  2,  3,  4],<br \/>\n                [ 5,  6,  7,  8,  9],<br \/>\n                [10, 11, 12, 13, 14],<br \/>\n                [15, 16, 17, 18, 19]],<\/p>\n<p>                [[20, 21, 22, 23, 24],<br \/>\n                [25, 26, 27, 28, 29],<br \/>\n                [30, 31, 32, 33, 34],<br \/>\n                [35, 36, 37, 38, 39]],<\/p>\n<p>                [[40, 41, 42, 43, 44],<br \/>\n                [45, 46, 47, 48, 49],<br \/>\n                [50, 51, 52, 53, 54],<br \/>\n                [55, 56, 57, 58, 59]]]) <\/p>\n<h4><span style=\"color:#1c7331\">\u53d6\u51fa\u7b2c\u4e00\u5c42\u7684\u6240\u6709\u6570\u636e<\/span><\/h4>\n<p><span style=\"background-color:#cbe0f1\">\u4ee3\u7801\u5b9e\u73b0&#xff1a;<\/span><\/p>\n<p># \u9009\u62e9\u7279\u5b9a\u7684\u5c42<br \/>\n# \u4f7f\u7528\u6574\u6570\u6570\u7ec4 [0, 2] \u4f5c\u4e3a\u7b2c\u4e00\u4e2a\u7ef4\u5ea6 (\u5c42) \u7684\u7d22\u5f15<br \/>\narr3d[1, :, :] <\/p>\n<p><span style=\"background-color:#f9eda6\">\u4ee3\u7801\u89e3\u91ca<\/span><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"346\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/05\/20250521093757-682d9ef5491f9.png\" width=\"700\" \/><\/p>\n<h4><span style=\"color:#1c7331\">\u53d6\u51fa\u4e09\u7ef4\u6570\u7ec4\u7684\u7b2c\u4e00\u5c42\u7b2c0\u884c&#xff08;\u5b9e\u9645\u4e3a\u7b2c1\u884c&#xff09;\u5230\u7b2c1\u884c&#xff08;\u5b9e\u9645\u4e3a\u7b2c2\u884c&#xff09;\u7684\u5168\u90e8\u6570\u636e<\/span><\/h4>\n<p><span style=\"background-color:#cbe0f1\">\u4ee3\u7801\u5b9e\u73b0&#xff1a;<\/span><\/p>\n<p>arr3d[1, 0:2, :]<\/p>\n<p>\u6253\u5370\u7ed3\u679c&#xff1a;<br \/>\narray([[20, 21, 22, 23, 24],<br \/>\n       [25, 26, 27, 28, 29]]) <\/p>\n<h4><span style=\"color:#1c7331\">\u53d6\u51fa\u4e09\u7ef4\u6570\u7ec4\u7684\u7b2c\u4e00\u5c42\u7b2c0\u884c\u5230\u7b2c1\u884c&#xff0c;\u7b2c2\u5217&#xff08;\u5b9e\u9645\u4e3a\u7b2c3\u5217&#xff09;\u5230\u7b2c3\u5217&#xff08;\u5b9e\u9645\u4e3a\u7b2c4\u5217&#xff09;\u7684\u6570\u636e<\/span><\/h4>\n<p><span style=\"background-color:#cbe0f1\">\u4ee3\u7801\u5b9e\u73b0<\/span><\/p>\n<p>arr3d[1, 0:2, 2:4]<br \/>\narray([[22, 23],<br \/>\n       [27, 28]]) <\/p>\n<p><span style=\"color:#1c7892\">\u8fd9\u51e0\u65e5\u56e0\u5907\u8003\u8d44\u683c\u8bc1&#xff08;&#034;\u8003\u4e0d\u5b8c\u7684\u8bd5&#xff0c;\u5b66\u4e0d\u5b8c\u7684\u4e60&lt;\u6276\u989d\u82e6\u7b11&gt;&#034;&#xff09;\u7684\u7f18\u6545\u6ca1\u6709\u6253\u5361\u5b66\u4e60&#xff0c;\u524d\u9762\u7684\u5185\u5bb9\u679c\u7136\u8fd8\u662f\u6709\u70b9\u751f\u758f\u4e86&#xff0c;\u63a5\u4e0b\u6765\u8fd8\u5f97\u65f6\u65f6\u5bf9\u4e4b\u524d\u7684\u5185\u5bb9\u8fdb\u884c\u56de\u987e&#xff0c;\u56de\u987e\u590d\u4e60\u7684\u57fa\u7840\u4e0a\u518d\u4e60\u65b0\u77e5\u3002\u7ee7\u7eed\u52a0\u6cb9&#xff01;&#xff01;&#xff01;&#064;\u6d59\u5927\u758f\u9526\u884c<\/span><\/p>\n<\/p>\n<\/p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u6587\u7ae0\u6d4f\u89c8\u9605\u8bfb478\u6b21\uff0c\u70b9\u8d5e5\u6b21\uff0c\u6536\u85cf4\u6b21\u3002\u7ee7\u7eedNumPy\u7684\u5b66\u4e60\u3002<\/p>\n","protected":false},"author":2,"featured_media":38883,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[81,3455,371],"topic":[],"class_list":{"0":"post-38885","1":"post","2":"type-post","3":"status-publish","4":"format-standard","5":"has-post-thumbnail","6":"hentry","7":"category-server","8":"tag-python","10":"tag-371"},"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v20.3 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Python Day26 \u5b66\u4e60 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.wsisp.com\/helps\/38885.html\" \/>\n<meta property=\"og:locale\" content=\"zh_CN\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Python Day26 \u5b66\u4e60 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"og:description\" content=\"\u6587\u7ae0\u6d4f\u89c8\u9605\u8bfb478\u6b21\uff0c\u70b9\u8d5e5\u6b21\uff0c\u6536\u85cf4\u6b21\u3002\u7ee7\u7eedNumPy\u7684\u5b66\u4e60\u3002\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.wsisp.com\/helps\/38885.html\" \/>\n<meta property=\"og:site_name\" content=\"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"article:published_time\" content=\"2025-05-21T09:37:58+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/05\/20250521093757-682d9ef5308af.png\" \/>\n<meta name=\"author\" content=\"admin\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"\u4f5c\u8005\" \/>\n\t<meta name=\"twitter:data1\" content=\"admin\" \/>\n\t<meta name=\"twitter:label2\" content=\"\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4\" \/>\n\t<meta name=\"twitter:data2\" content=\"1 \u5206\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/38885.html\",\"url\":\"https:\/\/www.wsisp.com\/helps\/38885.html\",\"name\":\"Python Day26 \u5b66\u4e60 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\",\"isPartOf\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#website\"},\"datePublished\":\"2025-05-21T09:37:58+00:00\",\"dateModified\":\"2025-05-21T09:37:58+00:00\",\"author\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41\"},\"breadcrumb\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/38885.html#breadcrumb\"},\"inLanguage\":\"zh-Hans\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.wsisp.com\/helps\/38885.html\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/38885.html#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u9996\u9875\",\"item\":\"https:\/\/www.wsisp.com\/helps\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Python Day26 \u5b66\u4e60\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#website\",\"url\":\"https:\/\/www.wsisp.com\/helps\/\",\"name\":\"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\",\"description\":\"\u9999\u6e2f\u670d\u52a1\u5668_\u9999\u6e2f\u4e91\u670d\u52a1\u5668\u8d44\u8baf_\u670d\u52a1\u5668\u5e2e\u52a9\u6587\u6863_\u670d\u52a1\u5668\u6559\u7a0b\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.wsisp.com\/helps\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"zh-Hans\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41\",\"name\":\"admin\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"zh-Hans\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery\",\"contentUrl\":\"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery\",\"caption\":\"admin\"},\"sameAs\":[\"http:\/\/wp.wsisp.com\"],\"url\":\"https:\/\/www.wsisp.com\/helps\/author\/admin\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Python Day26 \u5b66\u4e60 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.wsisp.com\/helps\/38885.html","og_locale":"zh_CN","og_type":"article","og_title":"Python Day26 \u5b66\u4e60 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","og_description":"\u6587\u7ae0\u6d4f\u89c8\u9605\u8bfb478\u6b21\uff0c\u70b9\u8d5e5\u6b21\uff0c\u6536\u85cf4\u6b21\u3002\u7ee7\u7eedNumPy\u7684\u5b66\u4e60\u3002","og_url":"https:\/\/www.wsisp.com\/helps\/38885.html","og_site_name":"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","article_published_time":"2025-05-21T09:37:58+00:00","og_image":[{"url":"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/05\/20250521093757-682d9ef5308af.png"}],"author":"admin","twitter_card":"summary_large_image","twitter_misc":{"\u4f5c\u8005":"admin","\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4":"1 \u5206"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.wsisp.com\/helps\/38885.html","url":"https:\/\/www.wsisp.com\/helps\/38885.html","name":"Python Day26 \u5b66\u4e60 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","isPartOf":{"@id":"https:\/\/www.wsisp.com\/helps\/#website"},"datePublished":"2025-05-21T09:37:58+00:00","dateModified":"2025-05-21T09:37:58+00:00","author":{"@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41"},"breadcrumb":{"@id":"https:\/\/www.wsisp.com\/helps\/38885.html#breadcrumb"},"inLanguage":"zh-Hans","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.wsisp.com\/helps\/38885.html"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.wsisp.com\/helps\/38885.html#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u9996\u9875","item":"https:\/\/www.wsisp.com\/helps"},{"@type":"ListItem","position":2,"name":"Python Day26 \u5b66\u4e60"}]},{"@type":"WebSite","@id":"https:\/\/www.wsisp.com\/helps\/#website","url":"https:\/\/www.wsisp.com\/helps\/","name":"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","description":"\u9999\u6e2f\u670d\u52a1\u5668_\u9999\u6e2f\u4e91\u670d\u52a1\u5668\u8d44\u8baf_\u670d\u52a1\u5668\u5e2e\u52a9\u6587\u6863_\u670d\u52a1\u5668\u6559\u7a0b","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.wsisp.com\/helps\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"zh-Hans"},{"@type":"Person","@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41","name":"admin","image":{"@type":"ImageObject","inLanguage":"zh-Hans","@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/image\/","url":"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery","contentUrl":"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery","caption":"admin"},"sameAs":["http:\/\/wp.wsisp.com"],"url":"https:\/\/www.wsisp.com\/helps\/author\/admin"}]}},"_links":{"self":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts\/38885","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/comments?post=38885"}],"version-history":[{"count":0,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts\/38885\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/media\/38883"}],"wp:attachment":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/media?parent=38885"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/categories?post=38885"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/tags?post=38885"},{"taxonomy":"topic","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/topic?post=38885"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}