{"id":1222,"date":"2017-08-20T19:48:27","date_gmt":"2017-08-20T10:48:27","guid":{"rendered":"http:\/\/www.python.ambitious-engineer.com\/?p=1222"},"modified":"2018-02-25T12:11:43","modified_gmt":"2018-02-25T03:11:43","slug":"numpy%e5%85%a5%e9%96%80-numpy%e3%81%a8%e3%81%af","status":"publish","type":"post","link":"https:\/\/www.python.ambitious-engineer.com\/archives\/1222","title":{"rendered":"NumPy\u5165\u9580 NumPy\u3068\u306f"},"content":{"rendered":"<h2>NumPy\u3068\u306f<\/h2>\n<p>\u79d1\u5b66\u6280\u8853\u8a08\u7b97\u3084Web\u30c7\u30fc\u30bf\u306e\u5206\u6790\u306a\u3069\u306e\u5927\u898f\u6a21\u306a\u30c7\u30fc\u30bf\u3092\u53d6\u308a\u6271\u3046\u5834\u5408\u3001\u591a\u6b21\u5143\u304b\u3064\u5927\u91cf\u306e\u30d9\u30af\u30c8\u30eb\uff08=\u914d\u5217\uff09\u306e\u6f14\u7b97\u304c\u5fc5\u8981\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n<p>Python\u306fC\u3084Java\u306a\u3069\u306e\u30b3\u30f3\u30d1\u30a4\u30e9\u8a00\u8a9e\u3068\u6bd4\u8f03\u3059\u308b\u3068\u304b\u306a\u308a\u9045\u3044\u305f\u3081\u3001\u305d\u3046\u3063\u305f\u6f14\u7b97\u3092\u884c\u3046\u3068\u96e3\u5100\u3059\u308b\u306e\u3067\u3059\u304c\u3001NumPy\u306e\u914d\u5217\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u300cndarray\u300d\u3092\u4f7f\u7528\u3059\u308b\u3053\u3068\u3067\u9ad8\u901f\u306a\u30c7\u30fc\u30bf\u51e6\u7406\u304c\u53ef\u80fd\u3068\u306a\u308a\u307e\u3059\u3002<\/p>\n<p>\u307e\u305f\u3001\u79d1\u5b66\u6280\u8853\u8a08\u7b97\u306e\u57fa\u790e\u30e9\u30a4\u30d6\u30e9\u30ea\u3068\u3057\u3066\u3055\u307e\u3056\u307e\u306a\u57fa\u672c\u7684\u306a\u6f14\u7b97\u6a5f\u80fd\u3092\u63d0\u4f9b\u3057\u3066\u3044\u308b\u305f\u3081\u3001Scipy\u3001Matplotlib\u3001Pandas\u306a\u3069\u591a\u304f\u306e\u30e9\u30a4\u30d6\u30e9\u30eaNumPy\u306b\u4f9d\u5b58\u3057\u3066\u3044\u307e\u3059\u3002<\/p>\n<p>\u3053\u306e\u305f\u3081\u3001\u57fa\u790e\u90e8\u5206\u306eNumPy\u3092\u7406\u89e3\u3059\u308b\u3053\u3068\u306b\u3088\u308a\u3001\u524d\u8ff0\u306eScipy\u3001Matplotlib\u3001Pandas\u306a\u3069\u306e\u7406\u89e3\u3092\u6df1\u3081\u308b\u3053\u3068\u304c\u3067\u304d\u308b\u3068\u601d\u3044\u307e\u3059\u3002<\/p>\n<h2>NumPy\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3068\u30a4\u30f3\u30dd\u30fc\u30c8<\/h2>\n<p>pip\u3067\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u53ef\u80fd\u3067\u3059\u3002anaconda\u306f\u4e88\u3081\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3055\u308c\u3066\u3044\u308b\u305f\u3081NumPy\u3092\u4f7f\u7528\u3059\u308b\u5834\u5408\u306f\u3053\u3061\u3089\u3092\u4f7f\u3046\u3068\u4fbf\u5229\u3067\u3059\u3002<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\r\npip install numpy\r\n<\/pre>\n<p>\u30a4\u30f3\u30dd\u30fc\u30c8\u3059\u308b\u969b\u306fnp\u3068\u540d\u524d\u3092\u4ed8\u3051\u308b\u306e\u304c\u4e00\u822c\u7684\u3067\u3059\u3002\u4f8b\u3048\u3070\u3001numpy\u3092\u30a4\u30f3\u30dd\u30fc\u30c8\u3057\u30013\u884c3\u5217\u306e\u884c\u5217\u3092\u751f\u6210\u3059\u308b\u5834\u5408\u306f\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u8a18\u8ff0\u3057\u307e\u3059\u3002\uff08\u8a73\u7d30\u306f\u5225\u9014\u8aac\u660e\u3057\u307e\u3059\u3002\uff09<\/p>\n<pre class=\"brush: python; title: ; notranslate\" title=\"\">\r\nimport numpy as np\r\n\r\nx = np.array([[11 , 12, 13], [21, 22, 23], [31, 32, 33]])\r\n# array([[11, 12, 13],\r\n#        [21, 22, 23],\r\n#        [31, 32, 33]])\r\n# \r\n\r\n<\/pre>\n<p>\u4ee5\u964d\u306e\u30b5\u30f3\u30d7\u30eb\u30b3\u30fc\u30c9\u3067\u306f\u30a4\u30f3\u30dd\u30fc\u30c8\u6587\u3092\u7701\u7565\u3059\u308b\u3053\u3068\u304c\u3042\u308a\u307e\u3059\u3002<\/p>\n<h2>\u7528\u8a9e\u306b\u3064\u3044\u3066<\/h2>\n<p>NumPy\u3067\u7528\u610f\u3055\u308c\u3066\u3044\u308b\u914d\u5217\u306fndarray\u3068\u3044\u3046NumPy\u72ec\u81ea\u306e\u578b\u306a\u306e\u3067\u3059\u304c\u3001\u4eca\u5f8c\u3053\u306endarray\u3067\u30d9\u30af\u30c8\u30eb\u3084\u884c\u5217\u3092\u8868\u3057\u307e\u3059\u3002\u300cNumPy\u306e\u914d\u5217\u300d\u3060\u3068\u5c11\u3057\u9577\u3044\u306e\u3067\u4eca\u5f8c\u306f\u5358\u7d14\u306b\u300carray\u300d\u3082\u3057\u304f\u306f\u300c\u914d\u5217\u300d\u3068\u8a18\u8ff0\u3057\u307e\u3059\u3002<\/p>\n<p>\u307e\u305f\u3001\u5b9f\u306fNumPy\u306b\u306f\u914d\u5217\u3068\u306f\u5225\u306b\u300cmatrix\uff08\u884c\u5217\uff09\u300d\u3068\u3044\u3046\u578b\u304c\u3042\u308b\u306e\u3067\u3059\u304c\u3001\u3042\u307e\u308a\u4f7f\u308f\u308c\u306a\u304f\u306a\u308a\u3064\u3064\u3042\u308b\u3089\u3057\u3044\u305f\u3081\u3001\u5f53\u30b5\u30a4\u30c8\u3067\u306f\u7dda\u5f62\u4ee3\u6570\u3068\u540c\u69d8\u3001\u5358\u7d14\u306b2\u6b21\u5143\u306e\u914d\u5217\u306e\u3053\u3068\u3092\u884c\u5217\u3068\u547c\u79f0\u3057\u307e\u3059\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>NumPy\u3068\u306f \u79d1\u5b66\u6280\u8853\u8a08\u7b97\u3084Web\u30c7\u30fc\u30bf\u306e\u5206\u6790\u306a\u3069\u306e\u5927\u898f\u6a21\u306a\u30c7\u30fc\u30bf\u3092\u53d6\u308a\u6271\u3046\u5834\u5408\u3001\u591a\u6b21\u5143\u304b\u3064\u5927\u91cf\u306e\u30d9\u30af\u30c8\u30eb\uff08=\u914d\u5217\uff09\u306e\u6f14\u7b97\u304c\u5fc5\u8981\u306b\u306a\u308a\u307e\u3059\u3002 Python\u306fC\u3084Java\u306a\u3069\u306e\u30b3\u30f3\u30d1\u30a4\u30e9\u8a00\u8a9e\u3068\u6bd4\u8f03\u3059\u308b\u3068\u304b\u306a\u308a\u9045\u3044\u305f\u3081\u3001\u305d...<\/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\/1222"}],"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=1222"}],"version-history":[{"count":10,"href":"https:\/\/www.python.ambitious-engineer.com\/wp-json\/wp\/v2\/posts\/1222\/revisions"}],"predecessor-version":[{"id":3499,"href":"https:\/\/www.python.ambitious-engineer.com\/wp-json\/wp\/v2\/posts\/1222\/revisions\/3499"}],"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=1222"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.python.ambitious-engineer.com\/wp-json\/wp\/v2\/categories?post=1222"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.python.ambitious-engineer.com\/wp-json\/wp\/v2\/tags?post=1222"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}