{"id":5099,"date":"2020-04-24T23:36:15","date_gmt":"2020-04-24T15:36:15","guid":{"rendered":"https:\/\/vip.fxxkpython.com\/?p=5099"},"modified":"2020-04-24T23:36:18","modified_gmt":"2020-04-24T15:36:18","slug":"python-%e6%95%b0%e6%8d%ae%e5%8f%af%e8%a7%86%e5%8c%96-03-numpy-%e6%95%b0%e6%8d%ae%e6%93%8d%e4%bd%9c%e4%b9%8b%e6%96%87%e4%bb%b6%e6%b5%81","status":"publish","type":"post","link":"https:\/\/vip.fxxkpython.com\/?p=5099","title":{"rendered":"Python \u6570\u636e\u53ef\u89c6\u5316 03 | NumPy \u6570\u636e\u64cd\u4f5c\u4e4b\u6587\u4ef6\u6d41"},"content":{"rendered":"\n<p>\u6709\u4e9b\u65f6\u5019\u6211\u4eec\u60f3\u8981\u5c06\u6587\u4ef6\u4e2d\u7684\u6570\u636e\u62ff\u5230\u4ee3\u7801\u91cc\u9762\u6765\u4f7f\u7528\uff0c\u6216\u8005\u5728\u4ee3\u7801\u4e2d\u5f97\u5230\u7684\u6570\u636e\u60f3\u8981\u5b58\u50a8\u5230\u672c\u5730\u6587\u4ef6\u4e2d\u53bb\uff0c\u6240\u4ee5\u8981\u5fc5\u8981\u4e86\u89e3\u4e00\u4e9b\u5982\u4f55\u901a\u8fc7 Numpy \u5bf9\u6587\u4ef6\u6d41\u8fdb\u884c\u64cd\u4f5c\u3002<\/p>\n\n\n\n<h2>NumPy \u5bf9\u6570\u636e\u5b58\u53d6<\/h2>\n\n\n\n<h3> np.save<\/h3>\n\n\n\n<p>\u53ef\u4ee5\u901a\u8fc7  save \u65b9\u6cd5\u6765\u5c06\u6570\u7ec4\u7684\u6570\u636e\u5b58\u50a8\u5230\u6587\u4ef6\u4e2d\uff0c\u9996\u5148\u6211\u4eec\u6765\u521b\u5efa\u4e00\u4e2a\u6570\u7ec4\uff1a<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter\"><img decoding=\"async\" width=\"787\" height=\"136\" src=\"https:\/\/vip.fxxkpython.com\/wp-content\/uploads\/2020\/04\/Screenshot-from-2020-04-24-22-38-47.png\" alt=\"\" class=\"wp-image-5100\" srcset=\"https:\/\/vip.fxxkpython.com\/wp-content\/uploads\/2020\/04\/Screenshot-from-2020-04-24-22-38-47.png 787w, https:\/\/vip.fxxkpython.com\/wp-content\/uploads\/2020\/04\/Screenshot-from-2020-04-24-22-38-47-300x52.png 300w, https:\/\/vip.fxxkpython.com\/wp-content\/uploads\/2020\/04\/Screenshot-from-2020-04-24-22-38-47-768x133.png 768w, https:\/\/vip.fxxkpython.com\/wp-content\/uploads\/2020\/04\/Screenshot-from-2020-04-24-22-38-47-769x133.png 769w\" sizes=\"(max-width: 787px) 100vw, 787px\" \/><\/figure><\/div>\n\n\n\n<p>\u5982\u679c\u8fd9\u65f6\u5019\u60f3\u8981\u5c06\u8fd9\u4e2a\u6570\u7ec4\u5b58\u50a8\u4e3a array_1 \u6587\u4ef6\u4e2d\uff0c\u90a3\u4e48\u4f60\u53ef\u4ee5\u8fd9\u6837\u64cd\u4f5c\uff1a<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter\"><img decoding=\"async\" width=\"491\" height=\"38\" src=\"https:\/\/vip.fxxkpython.com\/wp-content\/uploads\/2020\/04\/Screenshot-from-2020-04-24-22-39-38.png\" alt=\"\" class=\"wp-image-5101\" srcset=\"https:\/\/vip.fxxkpython.com\/wp-content\/uploads\/2020\/04\/Screenshot-from-2020-04-24-22-39-38.png 491w, https:\/\/vip.fxxkpython.com\/wp-content\/uploads\/2020\/04\/Screenshot-from-2020-04-24-22-39-38-300x23.png 300w\" sizes=\"(max-width: 491px) 100vw, 491px\" \/><\/figure><\/div>\n\n\n\n<p>\u8fd9\u65f6\u5019\u5f53\u524d\u76ee\u5f55\u4e0b\u5c31\u4f1a\u751f\u6210\u4e00\u4e2a npy \u540e\u7f00\u7684\u4e8c\u8fdb\u5236\u6587\u4ef6\uff0c\u91cc\u9762\u5b58\u50a8\u7684\u5c31\u662f\u4f60\u521a\u521a\u7684\u6570\u7ec4 a \u7684\u6570\u636e\uff1a<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter\"><img decoding=\"async\" width=\"600\" height=\"111\" src=\"https:\/\/vip.fxxkpython.com\/wp-content\/uploads\/2020\/04\/Screenshot-from-2020-04-24-22-39-55.png\" alt=\"\" class=\"wp-image-5102\" srcset=\"https:\/\/vip.fxxkpython.com\/wp-content\/uploads\/2020\/04\/Screenshot-from-2020-04-24-22-39-55.png 600w, https:\/\/vip.fxxkpython.com\/wp-content\/uploads\/2020\/04\/Screenshot-from-2020-04-24-22-39-55-300x56.png 300w\" sizes=\"(max-width: 600px) 100vw, 600px\" \/><\/figure><\/div>\n\n\n\n<h3 id=\"mce_12\"> np.load<\/h3>\n\n\n\n<p>\u76f8\u53cd\u7684\uff0c\u4f60\u60f3\u8981\u83b7\u53d6\u6587\u4ef6\u4e2d\u7684\u6570\u636e\uff0c\u90a3\u4e48\u53ef\u4ee5<div style=\"text-align:center;border:1px dashed #FF9A9A;padding:8px;margin:10px auto;color:#FF6666;\">\u672c\u6587\u9690\u85cf\u5185\u5bb9 <a href=\"https:\/\/vip.fxxkpython.com\/wp-login.php?redirect_to=https%3A%2F%2Fvip.fxxkpython.com%2F%3Fp%3D5099\">\u767b\u9646<\/a> \u540e\u624d\u53ef\u4ee5\u6d4f\u89c8<\/div>\u53cd\u5411\u64cd\u4f5c\uff0c\u4f7f\u7528 loadtxt \u6765\u83b7\u53d6\uff1a<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter\"><img decoding=\"async\" width=\"584\" height=\"163\" src=\"https:\/\/vip.fxxkpython.com\/wp-content\/uploads\/2020\/04\/Screenshot-from-2020-04-24-23-31-47.png\" alt=\"\" class=\"wp-image-5114\" srcset=\"https:\/\/vip.fxxkpython.com\/wp-content\/uploads\/2020\/04\/Screenshot-from-2020-04-24-23-31-47.png 584w, https:\/\/vip.fxxkpython.com\/wp-content\/uploads\/2020\/04\/Screenshot-from-2020-04-24-23-31-47-300x84.png 300w\" sizes=\"(max-width: 584px) 100vw, 584px\" \/><\/figure><\/div>\n\n\n\n<p>ok\uff0c\u4ee5\u4e0a\u5c31\u662f Numpy \u5bf9\u6587\u4ef6\u5e38\u7528\u7684\u5b58\u50a8\u64cd\u4f5c\uff0c\u4eca\u5929\u6f14\u793a\u7684\u4ee3\u7801\u5df2\u7ecf\u4e0a\u4f20\u5230 GitHub \u4e2d\uff0c\u4f9b\u4f60\u7ec3\u4e60\u53c2\u8003\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u6709\u4e9b\u65f6\u5019\u6211\u4eec\u60f3\u8981\u5c06\u6587\u4ef6\u4e2d\u7684\u6570\u636e\u62ff\u5230\u4ee3\u7801\u91cc\u9762\u6765\u4f7f\u7528\uff0c\u6216\u8005\u5728\u4ee3\u7801\u4e2d\u5f97\u5230\u7684\u6570\u636e\u60f3\u8981\u5b58\u50a8\u5230\u672c\u5730\u6587\u4ef6\u4e2d\u53bb\uff0c\u6240\u4ee5\u8981\u5fc5\u8981\u4e86\u89e3\u4e00\u4e9b\u5982\u4f55\u901a\u8fc7 Numpy \u5bf9\u6587\u4ef6\u6d41\u8fdb\u884c\u64cd\u4f5c\u3002 NumPy \u5bf9\u6570\u636e\u5b58\u53d6 np.save \u53ef\u4ee5\u901a\u8fc7 save \u65b9\u6cd5\u6765\u5c06\u6570\u7ec4\u7684\u6570\u636e\u5b58\u50a8\u5230\u6587\u4ef6\u4e2d\uff0c\u9996&hellip;<\/p>\n","protected":false},"author":1,"featured_media":5113,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[393],"tags":[409,407,402,19,406,408,394],"_links":{"self":[{"href":"https:\/\/vip.fxxkpython.com\/index.php?rest_route=\/wp\/v2\/posts\/5099"}],"collection":[{"href":"https:\/\/vip.fxxkpython.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/vip.fxxkpython.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/vip.fxxkpython.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/vip.fxxkpython.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=5099"}],"version-history":[{"count":1,"href":"https:\/\/vip.fxxkpython.com\/index.php?rest_route=\/wp\/v2\/posts\/5099\/revisions"}],"predecessor-version":[{"id":5115,"href":"https:\/\/vip.fxxkpython.com\/index.php?rest_route=\/wp\/v2\/posts\/5099\/revisions\/5115"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/vip.fxxkpython.com\/index.php?rest_route=\/wp\/v2\/media\/5113"}],"wp:attachment":[{"href":"https:\/\/vip.fxxkpython.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=5099"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/vip.fxxkpython.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=5099"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/vip.fxxkpython.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=5099"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}