{"id":1257,"date":"2017-08-24T20:23:47","date_gmt":"2017-08-24T11:23:47","guid":{"rendered":"http:\/\/www.python.ambitious-engineer.com\/?p=1257"},"modified":"2018-02-25T12:12:29","modified_gmt":"2018-02-25T03:12:29","slug":"numpy%e5%85%a5%e9%96%80-%e3%82%88%e3%81%8f%e4%bd%bf%e3%81%86%e8%a1%8c%e5%88%97%e3%81%ae%e7%94%9f%e6%88%90%e5%8d%98%e4%bd%8d%e8%a1%8c%e5%88%97%e3%83%bb%e3%82%bc%e3%83%ad%e8%a1%8c%e5%88%97%e3%83%bb","status":"publish","type":"post","link":"https:\/\/www.python.ambitious-engineer.com\/archives\/1257","title":{"rendered":"NumPy\u5165\u9580 \u3088\u304f\u4f7f\u3046\u884c\u5217\u306e\u751f\u6210(\u5358\u4f4d\u884c\u5217\u30fb\u30bc\u30ed\u884c\u5217\u30fb\u4e09\u89d2\u884c\u5217)"},"content":{"rendered":"<p><a href=\"http:\/\/www.python.ambitious-engineer.com\/archives\/1230\">\u524d\u56de<\/a>\u3001\u4efb\u610f\u306e\u30b5\u30a4\u30ba\u306e\u884c\u5217\u751f\u6210\u65b9\u6cd5\u306b\u3064\u3044\u3066\u5b66\u7fd2\u3057\u307e\u3057\u305f\u304c\u3001\u4eca\u56de\u306f\u5358\u4f4d\u884c\u5217\u306a\u3069\u3088\u304f\u4f7f\u3046\u884c\u5217\u306e\u751f\u6210\u65b9\u6cd5\u306b\u3064\u3044\u3066\u5b66\u7fd2\u3057\u307e\u3059\u3002<\/p>\n<h2>\u5358\u4f4d\u884c\u5217<\/h2>\n<p>\u5358\u4f4d\u884c\u5217\u306e\u751f\u6210\u306b\u306feye\u3092\u4f7f\u7528\u3057\u307e\u3059\u3002\u5f15\u6570\u306b\u30b5\u30a4\u30ba\u3092\u6307\u5b9a\u3057\u307e\u3059\u3002<\/p>\n<pre class=\"brush: python; title: ; notranslate\" title=\"\">\r\nE = np.eye(4)\r\n# array([[ 1.,  0.,  0.,  0.],\r\n#        [ 0.,  1.,  0.,  0.],\r\n#        [ 0.,  0.,  1.,  0.],\r\n#        [ 0.,  0.,  0.,  1.]])\r\n# \r\n<\/pre>\n<h2>\u4e09\u89d2\u884c\u5217<\/h2>\n<p>\u4e09\u89d2\u884c\u5217\u306e\u751f\u6210\u306b\u306ftri\u3092\u6307\u5b9a\u3057\u307e\u3059\u3002\u3084\u306f\u308a\u5f15\u6570\u306b\u30b5\u30a4\u30ba\u3092\u6307\u5b9a\u3057\u307e\u3059\u3002<\/p>\n<pre class=\"brush: python; title: ; notranslate\" title=\"\">\r\nTR = np.tri(4)\r\n# array([[ 1.,  0.,  0.,  0.],\r\n#        [ 1.,  1.,  0.,  0.],\r\n#        [ 1.,  1.,  1.,  0.],\r\n#        [ 1.,  1.,  1.,  1.]])\r\n# \r\n<\/pre>\n<h2>\u30bc\u30ed\u884c\u5217<\/h2>\n<p>\u30bc\u30ed\u884c\u5217\u306e\u751f\u6210\u306b\u306fzeros\u3092\u4f7f\u7528\u3057\u307e\u3059\u3002\u5f15\u6570\u306b\u884c\u00d7\u5217\u306e\u30bf\u30d7\u30eb\u3084\u30ea\u30b9\u30c8\u3092\u6307\u5b9a\u3057\u307e\u3059\u3002\u4f8b\u3048\u3070\u3001\uff12\u884c\uff13\u5217\u306e\u30bc\u30ed\u884c\u5217\u3092\u751f\u6210\u3059\u308b\u5834\u5408\u306f\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u8a18\u8ff0\u3057\u307e\u3059\u3002<\/p>\n<pre class=\"brush: python; title: ; notranslate\" title=\"\">\r\nZERO = np.zeros((2, 3, ))\r\n# array([[ 0.,  0.,  0.],\r\n#        [ 0.,  0.,  0.]])\r\n<\/pre>\n<h2>\u8981\u7d20\u304c\u5168\u30661\u306e\u884c\u5217<\/h2>\n<p>ones\u3092\u4f7f\u7528\u3059\u308b\u3068\u8981\u7d20\u304c\u5168\u30661\u306e\u884c\u5217\u3092\u751f\u6210\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002\u5f15\u6570\u306b\u884c\u00d7\u5217\u306e\u30bf\u30d7\u30eb\u3084\u30ea\u30b9\u30c8\u3092\u6307\u5b9a\u3057\u307e\u3059\u3002<\/p>\n<pre class=\"brush: python; title: ; notranslate\" title=\"\">\r\nONES = np.ones((3, 2, ))\r\n# array([[ 1.,  1.],\r\n#        [ 1.,  1.],\r\n#        [ 1.,  1.]])\r\n# \r\n<\/pre>\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u524d\u56de\u3001\u4efb\u610f\u306e\u30b5\u30a4\u30ba\u306e\u884c\u5217\u751f\u6210\u65b9\u6cd5\u306b\u3064\u3044\u3066\u5b66\u7fd2\u3057\u307e\u3057\u305f\u304c\u3001\u4eca\u56de\u306f\u5358\u4f4d\u884c\u5217\u306a\u3069\u3088\u304f\u4f7f\u3046\u884c\u5217\u306e\u751f\u6210\u65b9\u6cd5\u306b\u3064\u3044\u3066\u5b66\u7fd2\u3057\u307e\u3059\u3002 \u5358\u4f4d\u884c\u5217 \u5358\u4f4d\u884c\u5217\u306e\u751f\u6210\u306b\u306feye\u3092\u4f7f\u7528\u3057\u307e\u3059\u3002\u5f15\u6570\u306b\u30b5\u30a4\u30ba\u3092\u6307\u5b9a\u3057\u307e\u3059\u3002 \u4e09\u89d2\u884c\u5217 \u4e09\u89d2\u884c\u5217\u306e\u751f\u6210\u306b...<\/p>\n","protected":false},"author":1,"featured_media":1607,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":[],"categories":[168],"tags":[],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/www.python.ambitious-engineer.com\/wp-json\/wp\/v2\/posts\/1257"}],"collection":[{"href":"https:\/\/www.python.ambitious-engineer.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.python.ambitious-engineer.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.python.ambitious-engineer.com\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.python.ambitious-engineer.com\/wp-json\/wp\/v2\/comments?post=1257"}],"version-history":[{"count":4,"href":"https:\/\/www.python.ambitious-engineer.com\/wp-json\/wp\/v2\/posts\/1257\/revisions"}],"predecessor-version":[{"id":3502,"href":"https:\/\/www.python.ambitious-engineer.com\/wp-json\/wp\/v2\/posts\/1257\/revisions\/3502"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.python.ambitious-engineer.com\/wp-json\/wp\/v2\/media\/1607"}],"wp:attachment":[{"href":"https:\/\/www.python.ambitious-engineer.com\/wp-json\/wp\/v2\/media?parent=1257"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.python.ambitious-engineer.com\/wp-json\/wp\/v2\/categories?post=1257"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.python.ambitious-engineer.com\/wp-json\/wp\/v2\/tags?post=1257"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}