{"id":286,"date":"2019-06-10T14:44:17","date_gmt":"2019-06-10T06:44:17","guid":{"rendered":"https:\/\/harson.co\/?p=286"},"modified":"2020-01-06T20:50:53","modified_gmt":"2020-01-06T12:50:53","slug":"lib-of-numpy-dataanalysis","status":"publish","type":"post","link":"https:\/\/harson.co\/index.php\/2019\/06\/10\/lib-of-numpy-dataanalysis\/","title":{"rendered":"Lib of NumPy-DataAnalysis"},"content":{"rendered":"<p>\u5b89\u88c5\u53ca\u5f15\u7528<\/p>\n<pre class=\"pure-highlightjs\"><code class=\"\">pip install numpy\r\n\r\nimport numpy as np<\/code><\/pre>\n<p>\u5b83\u5305\u542b\u4e00\u4e2aN\u7ef4\u6570\u7ec4\u5bf9\u8c61 ndarrary<\/p>\n<pre class=\"pure-highlightjs\"><code class=\"\">import numpy as np\r\n\r\ndef npSum():\r\n    a = np.array(0, 1, 2, 3, 4) #c\u521b\u5efandarrary\u6570\u7ec4\r\n    b = np.array(9, 8, 7, 6, 5)\r\n\r\n    c = a**2 + b**3\r\n    return c\r\n#\u8fd4\u56dea\u5bf9\u5e94\u5143\u7d20\u7684\u5e73\u65b9\u4e0eb\u5bf9\u5e94\u5143\u7d20\u7684\u7acb\u65b9\u7684\u548c \u5305\u62ec\u7684\u5217\u8868\r\n\r\n    <\/code><\/pre>\n<p>ndarrary\u5e38\u7528\u65b9\u6cd5<\/p>\n<pre class=\"pure-highlightjs\"><code class=\"\">a.ndim #\u8fd4\u56de\u6570\u7ec4\u7ef4\u5ea6\r\n\r\na.shape #\u8fd4\u56de\u6570\u7ec4\u5bf9\u5e94\u89c4\u6a21\r\n\r\na.size #\u8fd4\u56de\u6570\u7ec4\u5927\u5c0f\r\n\r\na.dtype #\u8fd4\u56de\u6570\u7ec4\u6570\u636e\u7c7b\u578b\r\n\r\na.itemsize #\u8fd4\u56de\u6570\u7ec4\u6570\u636e\u7c7b\u578b\u5360\u7528\u8282\u6570<\/code><\/pre>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u5b89\u88c5\u53ca\u5f15\u7528 pip install numpy import numpy as np \u5b83\u5305\u542b\u4e00\u4e2aN\u7ef4\u6570\u7ec4\u5bf9\u8c61  [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[9],"tags":[],"class_list":["post-286","post","type-post","status-publish","format-standard","hentry","category-python"],"_links":{"self":[{"href":"https:\/\/harson.co\/index.php\/wp-json\/wp\/v2\/posts\/286","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/harson.co\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/harson.co\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/harson.co\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/harson.co\/index.php\/wp-json\/wp\/v2\/comments?post=286"}],"version-history":[{"count":2,"href":"https:\/\/harson.co\/index.php\/wp-json\/wp\/v2\/posts\/286\/revisions"}],"predecessor-version":[{"id":435,"href":"https:\/\/harson.co\/index.php\/wp-json\/wp\/v2\/posts\/286\/revisions\/435"}],"wp:attachment":[{"href":"https:\/\/harson.co\/index.php\/wp-json\/wp\/v2\/media?parent=286"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/harson.co\/index.php\/wp-json\/wp\/v2\/categories?post=286"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/harson.co\/index.php\/wp-json\/wp\/v2\/tags?post=286"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}