{"id":599,"date":"2024-05-02T23:08:16","date_gmt":"2024-05-02T14:08:16","guid":{"rendered":"https:\/\/chocottopro.com\/?p=599"},"modified":"2024-06-14T17:00:10","modified_gmt":"2024-06-14T08:00:10","slug":"%e3%80%90%e5%ae%8c%e5%85%a8%e7%89%88%e3%80%91numpy%e3%81%ae%e4%bd%bf%e3%81%84%e6%96%b9%e3%82%92%e5%88%9d%e5%bf%83%e8%80%85%e5%90%91%e3%81%91%e3%81%ab%e5%be%b9%e5%ba%95%e8%a7%a3%e8%aa%ac%ef%bc%81","status":"publish","type":"post","link":"https:\/\/chocottopro.com\/?p=599","title":{"rendered":"\u3010\u5b8c\u5168\u7248\u3011numpy\u306e\u4f7f\u3044\u65b9\u3092\u521d\u5fc3\u8005\u5411\u3051\u306b\u5fb9\u5e95\u89e3\u8aac\uff01\u30c7\u30fc\u30bf\u30b5\u30a4\u30a8\u30f3\u30b9\u306e\u751f\u7523\u6027\u304c10\u500d\u30a2\u30c3\u30d7"},"content":{"rendered":"\n<p><span class=\"keiko_yellow\">Python\u3067\u30c7\u30fc\u30bf\u30b5\u30a4\u30a8\u30f3\u30b9\u3084\u6a5f\u68b0\u5b66\u7fd2\u306b\u53d6\u308a\u7d44\u3080\u306a\u3089\u3001numpy\u306f\u5fc5\u9808\u306e\u30e9\u30a4\u30d6\u30e9\u30ea\u3067\u3059\u3002<\/span>\u3053\u306e\u8a18\u4e8b\u3067\u306f\u3001numpy\u306e\u57fa\u672c\u7684\u306a\u6982\u5ff5\u304b\u3089\u5b9f\u8df5\u7684\u306a\u4f7f\u3044\u65b9\u307e\u3067\u3001\u521d\u5fc3\u8005\u3067\u3082\u308f\u304b\u308b\u3088\u3046\u306b\u5fb9\u5e95\u7684\u306b\u89e3\u8aac\u3057\u307e\u3059\u3002numpy\u3092\u4f7f\u3044\u3053\u306a\u3059\u3053\u3068\u3067\u3001\u30c7\u30fc\u30bf\u5206\u6790\u306e\u52b9\u7387\u3068\u53ef\u80fd\u6027\u3092\u5927\u304d\u304f\u5e83\u3052\u308b\u3053\u3068\u304c\u3067\u304d\u308b\u3067\u3057\u3087\u3046\u3002<\/p>\n\n\n\n<div class=\"wp-block-sgb-block-simple sgb-box-simple sgb-box-simple--title-normal sgb-box-simple--with-border\"><div style=\"background-color:var(--wp--preset--color--sango-main);color:#FFF\" class=\"sgb-box-simple__title\">\u3053\u306e\u8a18\u4e8b\u3092\u8aad\u3093\u3060\u3089\u308f\u304b\u308b\u3053\u3068<\/div><div class=\"sgb-box-simple__body\" style=\"border-color:var(--wp--preset--color--sango-main);background-color:#FFF\">\n<ul class=\"wp-block-list\">\n<li>numpy\u306e\u57fa\u672c\u7684\u306a\u6982\u5ff5\u3068\u6a5f\u80fd <\/li>\n\n\n\n<li>numpy\u3092\u4f7f\u3046\u30e1\u30ea\u30c3\u30c8\u3068\u914d\u5217\u8a08\u7b97\u306e\u9ad8\u901f\u5316 <\/li>\n\n\n\n<li>ndarray\u306e\u751f\u6210\u3068\u64cd\u4f5c\u65b9\u6cd5 <\/li>\n\n\n\n<li>\u30e6\u30cb\u30d0\u30fc\u30b5\u30eb\u30d5\u30a1\u30f3\u30af\u30b7\u30e7\u30f3\u3068\u30d6\u30ed\u30fc\u30c9\u30ad\u30e3\u30b9\u30c6\u30a3\u30f3\u30b0\u306e\u6d3b\u7528 <\/li>\n\n\n\n<li>\u5927\u898f\u6a21\u30c7\u30fc\u30bf\u306e\u52b9\u7387\u7684\u306a\u8aad\u307f\u8fbc\u307f\u3068\u524d\u51e6\u7406 <\/li>\n\n\n\n<li>\u7d71\u8a08\u51e6\u7406\u3068\u7dda\u5f62\u4ee3\u6570\u8a08\u7b97\u3078\u306enumpy\u306e\u5fdc\u7528 <\/li>\n\n\n\n<li>\u6a5f\u68b0\u5b66\u7fd2\u306b\u304a\u3051\u308bnumpy\u306e\u5f79\u5272 <\/li>\n\n\n\n<li>\u30e1\u30e2\u30ea\u4f7f\u7528\u91cf\u306e\u6700\u9069\u5316\u30c6\u30af\u30cb\u30c3\u30af <\/li>\n\n\n\n<li>numpy\u306e\u5b66\u7fd2\u30ea\u30bd\u30fc\u30b9\u3068\u95a2\u9023\u30e9\u30a4\u30d6\u30e9\u30ea <\/li>\n\n\n\n<li>\u30d7\u30ed\u306e\u30c7\u30fc\u30bf\u30b5\u30a4\u30a8\u30f3\u30c6\u30a3\u30b9\u30c8\u306b\u3088\u308b\u4f7f\u7528\u4f8b<\/li>\n<\/ul>\n<\/div><\/div>\n\n\n\n<div class=\"toc\"><br \/>\n<b>Warning<\/b>:  Undefined array key \"is_admin\" in <b>\/home\/c7479301\/public_html\/chocottopro.com\/wp-content\/themes\/sango-theme\/library\/gutenberg\/dist\/classes\/Toc.php<\/b> on line <b>116<\/b><br \/>\n<br \/>\n<b>Warning<\/b>:  Undefined array key \"is_category_top\" in <b>\/home\/c7479301\/public_html\/chocottopro.com\/wp-content\/themes\/sango-theme\/library\/gutenberg\/dist\/classes\/Toc.php<\/b> on line <b>121<\/b><br \/>\n<br \/>\n<b>Warning<\/b>:  Undefined array key \"is_top\" in <b>\/home\/c7479301\/public_html\/chocottopro.com\/wp-content\/themes\/sango-theme\/library\/gutenberg\/dist\/classes\/Toc.php<\/b> on line <b>128<\/b><br \/>\n    <div id=\"toc_container\" class=\"sgb-toc--bullets js-smooth-scroll\" data-dialog-title=\"Table of Contents\">\n      <p class=\"toc_title\">\u76ee\u6b21 <\/p>\n      <ul class=\"toc_list\">  <li class=\"first\">    <a href=\"#i-0\">numpy\u3068\u306f\uff1f\u6a5f\u68b0\u5b66\u7fd2\u306b\u4e0d\u53ef\u6b20\u306aPython\u30e9\u30a4\u30d6\u30e9\u30ea\u3092\u89e3\u8aac<\/a>    <ul class=\"menu_level_1\">      <li class=\"first\">        <a href=\"#i-1\">numpy\u306e\u57fa\u672c\u7684\u306a\u6982\u5ff5\u3068\u6a5f\u80fd<\/a>      <\/li>      <li class=\"last\">        <a href=\"#i-2\">numpy\u3092\u4f7f\u3046\u30e1\u30ea\u30c3\u30c8 \u2013 \u914d\u5217\u8a08\u7b97\u304c\u5727\u5012\u7684\u306b\u9ad8\u901f\u306b<\/a>      <\/li>    <\/ul>  <\/li>  <li>    <a href=\"#i-3\">numpy\u306e\u57fa\u672c\u7684\u306a\u4f7f\u3044\u65b9\u3092\u30de\u30b9\u30bf\u30fc\u3057\u3088\u3046<\/a>    <ul class=\"menu_level_1\">      <li class=\"first\">        <a href=\"#i-4\">ndarray\u306e\u751f\u6210\u3068\u914d\u5217\u306e\u64cd\u4f5c<\/a>      <\/li>      <li>        <a href=\"#i-5\">\u30e6\u30cb\u30d0\u30fc\u30b5\u30eb\u30d5\u30a1\u30f3\u30af\u30b7\u30e7\u30f3\u3092\u4f7f\u3063\u305f\u9ad8\u901f\u51e6\u7406<\/a>      <\/li>      <li class=\"last\">        <a href=\"#i-6\">\u30d6\u30ed\u30fc\u30c9\u30ad\u30e3\u30b9\u30c6\u30a3\u30f3\u30b0\u306b\u3088\u308b\u914d\u5217\u8a08\u7b97<\/a>      <\/li>    <\/ul>  <\/li>  <li>    <a href=\"#i-7\">\u5b9f\u8df5\uff01numpy\u3092\u4f7f\u3063\u305f\u30c7\u30fc\u30bf\u51e6\u7406\u30c6\u30af\u30cb\u30c3\u30af<\/a>    <ul class=\"menu_level_1\">      <li class=\"first\">        <a href=\"#i-8\">\u5927\u898f\u6a21\u30c7\u30fc\u30bf\u306e\u52b9\u7387\u7684\u306a\u8aad\u307f\u8fbc\u307f\u3068\u524d\u51e6\u7406<\/a>      <\/li>      <li>        <a href=\"#i-9\">\u7d71\u8a08\u51e6\u7406\u3068\u7dda\u5f62\u4ee3\u6570\u8a08\u7b97\u3078\u306e\u6d3b\u7528\u6cd5<\/a>      <\/li>      <li class=\"last\">        <a href=\"#i-10\">\u6a5f\u68b0\u5b66\u7fd2\u306b\u304a\u3051\u308bnumpy\u306e\u4f7f\u3044\u65b9<\/a>      <\/li>    <\/ul>  <\/li>  <li>    <a href=\"#i-11\">numpy\u3067\u30e1\u30e2\u30ea\u4f7f\u7528\u91cf\u3092\u6700\u9069\u5316\u3059\u308b\u65b9\u6cd5<\/a>    <ul class=\"menu_level_1\">      <li class=\"first\">        <a href=\"#i-12\">\u30e1\u30e2\u30ea\u4f7f\u7528\u91cf\u3092\u524a\u6e1b\u3059\u308b\u30b3\u30c4<\/a>      <\/li>      <li class=\"last\">        <a href=\"#i-13\">\u5927\u898f\u6a21\u30c7\u30fc\u30bf\u3092\u6271\u3046\u969b\u306e\u30d9\u30b9\u30c8\u30d7\u30e9\u30af\u30c6\u30a3\u30b9<\/a>      <\/li>    <\/ul>  <\/li>  <li>    <a href=\"#i-14\">numpy\u3092\u4f7f\u3044\u3053\u306a\u3059\u305f\u3081\u306e\u53c2\u8003\u60c5\u5831<\/a>    <ul class=\"menu_level_1\">      <li class=\"first\">        <a href=\"#i-15\">\u516c\u5f0f\u30c9\u30ad\u30e5\u30e1\u30f3\u30c8\u3068\u5b66\u7fd2\u30ea\u30bd\u30fc\u30b9<\/a>      <\/li>      <li>        <a href=\"#i-16\">numpy\u306e\u30a8\u30b3\u30b7\u30b9\u30c6\u30e0\u3068\u95a2\u9023\u30e9\u30a4\u30d6\u30e9\u30ea<\/a>      <\/li>      <li class=\"last\">        <a href=\"#i-17\">\u30d7\u30ed\u306e\u30c7\u30fc\u30bf\u30b5\u30a4\u30a8\u30f3\u30c6\u30a3\u30b9\u30c8\u306b\u3088\u308b\u4f7f\u3044\u65b9\u306e\u5b9f\u4f8b<\/a>      <\/li>    <\/ul>  <\/li>  <li>    <a href=\"#i-18\">\u516c\u5f0f\u30c9\u30ad\u30e5\u30e1\u30f3\u30c8<\/a>  <\/li>  <li class=\"last\">    <a href=\"#i-19\">\u95a2\u9023\u8a18\u4e8b<\/a>  <\/li><\/ul>\n      \n    <\/div><\/div><h2 class=\"wp-block-heading\" id=\"i-0\">numpy\u3068\u306f\uff1f\u6a5f\u68b0\u5b66\u7fd2\u306b\u4e0d\u53ef\u6b20\u306aPython\u30e9\u30a4\u30d6\u30e9\u30ea\u3092\u89e3\u8aac<\/h2>\n\n\n\n<p>\u30c7\u30fc\u30bf\u30b5\u30a4\u30a8\u30f3\u30b9\u3084\u6a5f\u68b0\u5b66\u7fd2\u306e\u5206\u91ce\u3067\u3001Python\u3092\u4f7f\u3063\u3066\u3044\u308b\u4eba\u306a\u3089\u8ab0\u3082\u304c\u77e5\u3063\u3066\u3044\u308b\u30e9\u30a4\u30d6\u30e9\u30ea\u304c\u3042\u308a\u307e\u3059\u3002\u305d\u308c\u304c\u300cnumpy\u300d\u3067\u3059\u3002<span class=\"keiko_yellow\">numpy\u306f\u3001Numerical Python\u306e\u7565\u3067\u3001\u9ad8\u901f\u306a\u6570\u5024\u8a08\u7b97\u3092\u53ef\u80fd\u306b\u3059\u308bPython\u306e\u4e2d\u6838\u7684\u306a\u30e9\u30a4\u30d6\u30e9\u30ea\u3067\u3059\u3002<\/span>\u3053\u306e\u8a18\u4e8b\u3067\u306f\u3001numpy\u306e\u57fa\u672c\u7684\u306a\u6982\u5ff5\u3068\u6a5f\u80fd\u3001\u305d\u3057\u3066\u305d\u308c\u3092\u4f7f\u3046\u30e1\u30ea\u30c3\u30c8\u306b\u3064\u3044\u3066\u8a73\u3057\u304f\u89e3\u8aac\u3057\u3066\u3044\u304d\u307e\u3059\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"i-1\">numpy\u306e\u57fa\u672c\u7684\u306a\u6982\u5ff5\u3068\u6a5f\u80fd<\/h3>\n\n\n\n<p><span class=\"keiko_yellow\">numpy\u306e\u4e2d\u5fc3\u7684\u306a\u6982\u5ff5\u306f\u3001\u591a\u6b21\u5143\u914d\u5217\uff08ndarray\uff09\u3067\u3059\u3002<\/span>ndarray\u306f\u3001\u540c\u3058\u30c7\u30fc\u30bf\u578b\u306e\u8981\u7d20\u3092\u6301\u3064\u914d\u5217\u3067\u3001\u52b9\u7387\u7684\u306a\u30e1\u30e2\u30ea\u7ba1\u7406\u3068\u9ad8\u901f\u306a\u6570\u5024\u8a08\u7b97\u3092\u5b9f\u73fe\u3057\u307e\u3059\u3002\u4ee5\u4e0b\u306f\u3001ndarray\u306e\u57fa\u672c\u7684\u306a\u4f7f\u3044\u65b9\u3092\u793a\u3057\u305f\u30b5\u30f3\u30d7\u30eb\u30b3\u30fc\u30c9\u3067\u3059\u3002<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">import numpy as np\n\n# 1\u6b21\u5143\u914d\u5217\u306e\u751f\u6210\na = np.array([1, 2, 3, 4, 5])\nprint(a)  # [1 2 3 4 5]\n\n# \u591a\u6b21\u5143\u914d\u5217\u306e\u751f\u6210\nb = np.array([[1, 2, 3], [4, 5, 6]])  \nprint(b)\n# [[1 2 3]\n#  [4 5 6]]\n\n# \u914d\u5217\u306e\u5f62\u72b6\u3092\u78ba\u8a8d\nprint(b.shape)  # (2, 3)\n\n# \u914d\u5217\u306e\u8981\u7d20\u306b\u30a2\u30af\u30bb\u30b9\nprint(b[0, 1])  # 2\n\n# \u914d\u5217\u306e\u30b9\u30e9\u30a4\u30b9\nprint(b[0, :])  # [1 2 3]<\/pre>\n\n\n\n<p>numpy\u306f\u3001\u30d9\u30af\u30c8\u30eb\u5316\u6f14\u7b97\u3068\u3044\u3046\u6280\u8853\u3092\u7528\u3044\u3066\u3001C\u8a00\u8a9e\u3067\u5b9f\u88c5\u3055\u308c\u305f\u9ad8\u901f\u306a\u6570\u5024\u8a08\u7b97\u3092\u5b9f\u73fe\u3057\u3066\u3044\u307e\u3059\u3002\u307e\u305f\u3001\u30d6\u30ed\u30fc\u30c9\u30ad\u30e3\u30b9\u30c6\u30a3\u30f3\u30b0\u3068\u547c\u3070\u308c\u308b\u6a5f\u80fd\u306b\u3088\u308a\u3001\u7570\u306a\u308b\u30b5\u30a4\u30ba\u306e\u914d\u5217\u9593\u3067\u306e\u6f14\u7b97\u304c\u53ef\u80fd\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"i-2\">numpy\u3092\u4f7f\u3046\u30e1\u30ea\u30c3\u30c8 \u2013 \u914d\u5217\u8a08\u7b97\u304c\u5727\u5012\u7684\u306b\u9ad8\u901f\u306b<\/h3>\n\n\n\n<p><span class=\"keiko_yellow\">numpy\u3092\u4f7f\u3046\u6700\u5927\u306e\u30e1\u30ea\u30c3\u30c8\u306f\u3001\u305d\u306e\u8a08\u7b97\u901f\u5ea6\u306b\u3042\u308a\u307e\u3059\u3002<\/span>Python\u306e\u6a19\u6e96\u30ea\u30b9\u30c8\u306b\u6bd4\u3079\u3066\u3001numpy\u306endarray\u3092\u4f7f\u3063\u305f\u8a08\u7b97\u306f\u3001\u683c\u6bb5\u306b\u9ad8\u901f\u3067\u3059\u3002\u7279\u306b\u3001\u5927\u898f\u6a21\u306a\u30c7\u30fc\u30bf\u3092\u6271\u3046\u969b\u306b\u306f\u3001numpy\u306e\u771f\u4fa1\u304c\u767a\u63ee\u3055\u308c\u307e\u3059\u3002<\/p>\n\n\n\n<p>\u307e\u305f\u3001numpy\u306f\u3001MATLAB\u98a8\u306e\u76f4\u611f\u7684\u306a\u8a18\u6cd5\u3092\u63a1\u7528\u3057\u3066\u3044\u308b\u305f\u3081\u3001\u6570\u5b66\u7684\u306a\u64cd\u4f5c\u3092\u7c21\u6f54\u306b\u8a18\u8ff0\u3067\u304d\u307e\u3059\u3002\u79d1\u5b66\u8a08\u7b97\u3084\u30c7\u30fc\u30bf\u5206\u6790\u306b\u5fc5\u8981\u306a\u591a\u304f\u306e\u95a2\u6570\u3082\u7528\u610f\u3055\u308c\u3066\u304a\u308a\u3001\u4ed6\u306e\u30c7\u30fc\u30bf\u30b5\u30a4\u30a8\u30f3\u30b9\u30e9\u30a4\u30d6\u30e9\u30ea\u3068\u306e\u9023\u643a\u3082\u5bb9\u6613\u3067\u3059\u3002<\/p>\n\n\n\n<p>\u30c7\u30fc\u30bf\u5206\u6790\u3084\u6a5f\u68b0\u5b66\u7fd2\u306e\u5206\u91ce\u3067\u306f\u3001numpy\u306f\u6b20\u304b\u305b\u306a\u3044\u5b58\u5728\u3068\u306a\u3063\u3066\u3044\u307e\u3059\u3002\u30c7\u30fc\u30bf\u306e\u524d\u51e6\u7406\u3084\u7279\u5fb4\u91cf\u30a8\u30f3\u30b8\u30cb\u30a2\u30ea\u30f3\u30b0\u3001\u5927\u898f\u6a21\u306a\u884c\u5217\u6f14\u7b97\u3084\u7d71\u8a08\u8a08\u7b97\u306a\u3069\u3001\u3042\u3089\u3086\u308b\u5834\u9762\u3067numpy\u304c\u6d3b\u8e8d\u3057\u3066\u3044\u307e\u3059\u3002\u307e\u305f\u3001TensorFlow\u3084PyTorch\u3068\u3044\u3063\u305f\u6df1\u5c64\u5b66\u7fd2\u30d5\u30ec\u30fc\u30e0\u30ef\u30fc\u30af\u306e\u5185\u90e8\u3067\u3082\u3001numpy\u304c\u6570\u5024\u8a08\u7b97\u306e\u57fa\u76e4\u3068\u3057\u3066\u4f7f\u308f\u308c\u3066\u3044\u307e\u3059\u3002<\/p>\n\n\n\n<p>numpy\u3092\u7fd2\u5f97\u3059\u308b\u3053\u3068\u306f\u3001\u30c7\u30fc\u30bf\u30b5\u30a4\u30a8\u30f3\u30b9\u3084\u6a5f\u68b0\u5b66\u7fd2\u3092\u5b66\u3076\u4e0a\u3067\u3001\u975e\u5e38\u306b\u91cd\u8981\u306a\u30b9\u30c6\u30c3\u30d7\u3068\u8a00\u3048\u308b\u3067\u3057\u3087\u3046\u3002\u6b21\u306e\u7ae0\u3067\u306f\u3001numpy\u306e\u57fa\u672c\u7684\u306a\u4f7f\u3044\u65b9\u306b\u3064\u3044\u3066\u3001\u3055\u3089\u306b\u8a73\u3057\u304f\u898b\u3066\u3044\u304d\u307e\u3059\u3002<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"i-3\">numpy\u306e\u57fa\u672c\u7684\u306a\u4f7f\u3044\u65b9\u3092\u30de\u30b9\u30bf\u30fc\u3057\u3088\u3046<\/h2>\n\n\n\n<p>\u524d\u306e\u7ae0\u3067\u306f\u3001numpy\u306e\u57fa\u672c\u7684\u306a\u6982\u5ff5\u3068\u3001\u305d\u308c\u3092\u4f7f\u3046\u30e1\u30ea\u30c3\u30c8\u306b\u3064\u3044\u3066\u5b66\u3073\u307e\u3057\u305f\u3002\u3053\u3053\u304b\u3089\u306f\u3001\u5b9f\u969b\u306bnumpy\u3092\u4f7f\u3063\u3066\u3044\u304f\u4e0a\u3067\u6b20\u304b\u305b\u306a\u3044\u3001\u57fa\u672c\u7684\u306a\u4f7f\u3044\u65b9\u306b\u3064\u3044\u3066\u898b\u3066\u3044\u304d\u307e\u3057\u3087\u3046\u3002numpy\u3092\u52b9\u679c\u7684\u306b\u6d3b\u7528\u3059\u308b\u306b\u306f\u3001\u4ee5\u4e0b\u306e3\u3064\u306e\u6a5f\u80fd\u3092\u7406\u89e3\u3059\u308b\u3053\u3068\u304c\u7279\u306b\u91cd\u8981\u3067\u3059\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"i-4\">ndarray\u306e\u751f\u6210\u3068\u914d\u5217\u306e\u64cd\u4f5c<\/h3>\n\n\n\n<p><span class=\"keiko_yellow\">numpy\u306e\u4e2d\u5fc3\u7684\u306a\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u3067\u3042\u308bndarray\u306f\u3001np.array()\u3092\u4f7f\u3063\u3066\u751f\u6210\u3057\u307e\u3059\u3002<\/span>Python\u306e\u30ea\u30b9\u30c8\u3084\u884c\u5217\u3092\u5f15\u6570\u3068\u3057\u3066\u6e21\u3059\u3053\u3068\u3067\u3001\u69d8\u3005\u306a\u5f62\u72b6\u306endarray\u3092\u4f5c\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">import numpy as np\n\n# Python\u306e\u30ea\u30b9\u30c8\u304b\u3089ndarray\u3092\u751f\u6210\na = np.array([1, 2, 3, 4, 5])\nprint(a)  # [1 2 3 4 5]\n\n# \u884c\u5217\u304b\u3089ndarray\u3092\u751f\u6210\nb = np.array([[1, 2, 3], [4, 5, 6]])  \nprint(b)\n# [[1 2 3]\n#  [4 5 6]]<\/pre>\n\n\n\n<p>\u751f\u6210\u3057\u305fndarray\u306e\u5f62\u72b6\u306f\u3001shape\u5c5e\u6027\u3067\u78ba\u8a8d\u3067\u304d\u307e\u3059\u3002\u307e\u305f\u3001[ ]\u3092\u4f7f\u3063\u3066\u8981\u7d20\u306b\u30a2\u30af\u30bb\u30b9\u3057\u305f\u308a\u3001\u30b9\u30e9\u30a4\u30b9\u3092\u53d6\u5f97\u3057\u305f\u308a\u3067\u304d\u307e\u3059\u3002\u3055\u3089\u306b\u3001reshape()\u30e1\u30bd\u30c3\u30c9\u3092\u4f7f\u3048\u3070\u3001ndarray\u306e\u5f62\u72b6\u3092\u81ea\u7531\u306b\u5909\u66f4\u3059\u308b\u3053\u3068\u3082\u53ef\u80fd\u3067\u3059\u3002<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\"># ndarray\u306e\u5f62\u72b6\u3092\u78ba\u8a8d\nprint(b.shape)  # (2, 3)\n\n# ndarray\u306e\u8981\u7d20\u306b\u30a2\u30af\u30bb\u30b9\nprint(b[0, 1])  # 2\n\n# ndarray\u306e\u30b9\u30e9\u30a4\u30b9\nprint(b[0, :])  # [1 2 3]\n\n# ndarray\u306e\u5f62\u72b6\u3092\u5909\u66f4\nc = b.reshape((3, 2))\nprint(c)\n# [[1 2]\n#  [3 4]\n#  [5 6]]<\/pre>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"i-5\">\u30e6\u30cb\u30d0\u30fc\u30b5\u30eb\u30d5\u30a1\u30f3\u30af\u30b7\u30e7\u30f3\u3092\u4f7f\u3063\u305f\u9ad8\u901f\u51e6\u7406<\/h3>\n\n\n\n<p>numpy\u306b\u306f\u3001\u30e6\u30cb\u30d0\u30fc\u30b5\u30eb\u30d5\u30a1\u30f3\u30af\u30b7\u30e7\u30f3\uff08ufunc\uff09\u3068\u547c\u3070\u308c\u308b\u3001\u69d8\u3005\u306a\u6570\u5b66\u95a2\u6570\u304c\u7528\u610f\u3055\u308c\u3066\u3044\u307e\u3059\u3002ufunc\u306f\u3001ndarray\u306e\u8981\u7d20\u306b\u5bfe\u3057\u3066 element-wise \u306b\u9069\u7528\u3055\u308c\u308b\u305f\u3081\u3001for\u6587\u3092\u4f7f\u308f\u305a\u306b\u9ad8\u901f\u306a\u6f14\u7b97\u304c\u53ef\u80fd\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n\n\n\n<p>\u4f8b\u3048\u3070\u3001<span class=\"keiko_yellow\">np.sqrt()\u3092\u4f7f\u3048\u3070\u3001ndarray\u306e\u5404\u8981\u7d20\u306b\u3064\u3044\u3066\u5e73\u65b9\u6839\u3092\u8a08\u7b97\u3067\u304d\u307e\u3059\u3002\u307e\u305f\u3001np.exp()\u3092\u4f7f\u3048\u3070\u3001\u6307\u6570\u95a2\u6570\u3092\u9069\u7528\u3067\u304d\u307e\u3059\u3002<\/span><\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">import numpy as np\n\n# ndarray\u3092\u751f\u6210\na = np.array([1, 4, 9, 16, 25])\n\n# \u5e73\u65b9\u6839\u3092\u8a08\u7b97\nb = np.sqrt(a)\nprint(b)  # [1. 2. 3. 4. 5.]\n\n# \u6307\u6570\u95a2\u6570\u3092\u9069\u7528\nc = np.exp(a)\nprint(c)  # [2.71828183e+00 5.45981500e+01 8.10308393e+03 8.88611052e+06 7.20048993e+10]<\/pre>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"i-6\">\u30d6\u30ed\u30fc\u30c9\u30ad\u30e3\u30b9\u30c6\u30a3\u30f3\u30b0\u306b\u3088\u308b\u914d\u5217\u8a08\u7b97<\/h3>\n\n\n\n<p><span class=\"keiko_yellow\">\u30d6\u30ed\u30fc\u30c9\u30ad\u30e3\u30b9\u30c6\u30a3\u30f3\u30b0\u306f\u3001\u7570\u306a\u308b\u5f62\u72b6\u306endarray\u540c\u58eb\u3067\u6f14\u7b97\u3092\u884c\u3046\u969b\u306b\u3001numpy\u304c\u81ea\u52d5\u7684\u306b\u5c0f\u3055\u3044\u65b9\u306endarray\u3092\u62e1\u5f35\u3059\u308b\u6a5f\u80fd<\/span>\u3067\u3059\u3002\u3053\u308c\u306b\u3088\u308a\u3001\u660e\u793a\u7684\u306bfor\u6587\u3092\u4f7f\u308f\u306a\u304f\u3066\u3082\u3001\u7c21\u6f54\u306b\u6f14\u7b97\u3092\u8a18\u8ff0\u3067\u304d\u307e\u3059\u3002<\/p>\n\n\n\n<p>\u4f8b\u3048\u3070\u30011\u6b21\u5143\u914d\u5217\u30682\u6b21\u5143\u914d\u5217\u306e\u52a0\u7b97\u3082\u3001\u30d6\u30ed\u30fc\u30c9\u30ad\u30e3\u30b9\u30c6\u30a3\u30f3\u30b0\u3092\u4f7f\u3048\u3070\u4e00\u884c\u3067\u66f8\u304f\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">import numpy as np\n\n# 1\u6b21\u5143\u914d\u5217\u30682\u6b21\u5143\u914d\u5217\u306e\u6f14\u7b97\na = np.array([1, 2, 3])\nb = np.array([[1, 2, 3], [4, 5, 6]])\n\nc = a + b\nprint(c)\n# [[2 4 6]\n#  [5 7 9]]<\/pre>\n\n\n\n<p>\u3053\u308c\u3089\u306e\u57fa\u672c\u7684\u306a\u4f7f\u3044\u65b9\u3092\u8eab\u306b\u3064\u3051\u308b\u3053\u3068\u3067\u3001numpy\u3092\u4f7f\u3063\u305f\u30c7\u30fc\u30bf\u51e6\u7406\u306e\u52b9\u7387\u304c\u683c\u6bb5\u306b\u4e0a\u304c\u308b\u3067\u3057\u3087\u3046\u3002\u6b21\u306e\u7ae0\u3067\u306f\u3001\u5b9f\u969b\u306e\u30c7\u30fc\u30bf\u5206\u6790\u306bnumpy\u3092\u6d3b\u7528\u3059\u308b\u65b9\u6cd5\u306b\u3064\u3044\u3066\u3001\u5177\u4f53\u7684\u306b\u898b\u3066\u3044\u304d\u307e\u3059\u3002<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"i-7\">\u5b9f\u8df5\uff01numpy\u3092\u4f7f\u3063\u305f\u30c7\u30fc\u30bf\u51e6\u7406\u30c6\u30af\u30cb\u30c3\u30af<\/h2>\n\n\n\n<p>\u524d\u306e\u7ae0\u3067\u306f\u3001numpy\u306e\u57fa\u672c\u7684\u306a\u4f7f\u3044\u65b9\u306b\u3064\u3044\u3066\u5b66\u3073\u307e\u3057\u305f\u3002\u3053\u3053\u304b\u3089\u306f\u3001\u5b9f\u969b\u306e\u30c7\u30fc\u30bf\u5206\u6790\u3084\u6a5f\u68b0\u5b66\u7fd2\u306e\u5834\u9762\u3067\u3001numpy\u3092\u6d3b\u7528\u3059\u308b\u305f\u3081\u306e\u30c6\u30af\u30cb\u30c3\u30af\u3092\u898b\u3066\u3044\u304d\u307e\u3057\u3087\u3046\u3002\u5927\u898f\u6a21\u30c7\u30fc\u30bf\u306e\u51e6\u7406\u304b\u3089\u3001\u7d71\u8a08\u8a08\u7b97\u3001\u305d\u3057\u3066\u6a5f\u68b0\u5b66\u7fd2\u30a2\u30eb\u30b4\u30ea\u30ba\u30e0\u306e\u5b9f\u88c5\u307e\u3067\u3001numpy\u306f\u5e45\u5e83\u3044\u5834\u9762\u3067\u529b\u3092\u767a\u63ee\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"i-8\">\u5927\u898f\u6a21\u30c7\u30fc\u30bf\u306e\u52b9\u7387\u7684\u306a\u8aad\u307f\u8fbc\u307f\u3068\u524d\u51e6\u7406<\/h3>\n\n\n\n<p>\u30c7\u30fc\u30bf\u5206\u6790\u306e\u7b2c\u4e00\u6b69\u306f\u3001\u5927\u898f\u6a21\u306a\u30c7\u30fc\u30bf\u3092\u52b9\u7387\u7684\u306b\u8aad\u307f\u8fbc\u307f\u3001\u524d\u51e6\u7406\u3059\u308b\u3053\u3068\u3067\u3059\u3002numpy\u306b\u306f\u3001\u30c6\u30ad\u30b9\u30c8\u30d5\u30a1\u30a4\u30eb\u304b\u3089\u30c7\u30fc\u30bf\u3092\u9ad8\u901f\u306b\u8aad\u307f\u8fbc\u3080\u305f\u3081\u306e\u30e1\u30bd\u30c3\u30c9\u304c\u7528\u610f\u3055\u308c\u3066\u3044\u307e\u3059\u3002<\/p>\n\n\n\n<p>\u4f8b\u3048\u3070\u3001<span class=\"keiko_yellow\">np.loadtxt()\u3084np.genfromtxt()\u3092\u4f7f\u3048\u3070\u3001csv\u30d5\u30a1\u30a4\u30eb\u306a\u3069\u306e\u30c6\u30ad\u30b9\u30c8\u30c7\u30fc\u30bf\u3092\u7c21\u5358\u306bndarray\u306b\u5909\u63db\u3067\u304d\u307e\u3059\u3002<\/span>\u30c7\u30fc\u30bf\u306e\u4e00\u90e8\u3060\u3051\u3092\u8aad\u307f\u8fbc\u3093\u3060\u308a\u3001\u6b20\u640d\u5024\u3092\u9069\u5207\u306b\u51e6\u7406\u3057\u305f\u308a\u3059\u308b\u305f\u3081\u306e\u30d1\u30e9\u30e1\u30fc\u30bf\u3082\u8c4a\u5bcc\u306b\u7528\u610f\u3055\u308c\u3066\u3044\u307e\u3059\u3002<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">import numpy as np\n\n# \u30c6\u30ad\u30b9\u30c8\u30d5\u30a1\u30a4\u30eb\u304b\u3089\u30c7\u30fc\u30bf\u3092\u8aad\u307f\u8fbc\u3080\ndata = np.genfromtxt('data.txt', delimiter=',', skip_header=1)\n\n# \u6b20\u640d\u5024\u3092\u542b\u3080\u30c7\u30fc\u30bf\u3092\u8aad\u307f\u8fbc\u3080\ndata_missing = np.genfromtxt('data_missing.txt', delimiter=',', skip_header=1, filling_values=0)\n\n# \u30c7\u30fc\u30bf\u578b\u3092\u6307\u5b9a\u3057\u3066\u30e1\u30e2\u30ea\u4f7f\u7528\u91cf\u3092\u6700\u9069\u5316\ndata_optimized = np.genfromtxt('data.txt', delimiter=',', skip_header=1, dtype='float32')\n\n# \u30d6\u30ed\u30fc\u30c9\u30ad\u30e3\u30b9\u30c6\u30a3\u30f3\u30b0\u3092\u4f7f\u3063\u305f\u524d\u51e6\u7406\ndata_scaled = data - data.mean(axis=0)<\/pre>\n\n\n\n<p>\u3055\u3089\u306b\u3001\u30d6\u30ed\u30fc\u30c9\u30ad\u30e3\u30b9\u30c6\u30a3\u30f3\u30b0\u3092\u6d3b\u7528\u3059\u308b\u3053\u3068\u3067\u3001\u30c7\u30fc\u30bf\u306e\u6b63\u898f\u5316\u3084\u6a19\u6e96\u5316\u3068\u3044\u3063\u305f\u524d\u51e6\u7406\u3092\u9ad8\u901f\u306b\u884c\u3046\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"i-9\">\u7d71\u8a08\u51e6\u7406\u3068\u7dda\u5f62\u4ee3\u6570\u8a08\u7b97\u3078\u306e\u6d3b\u7528\u6cd5<\/h3>\n\n\n\n<p>\u30c7\u30fc\u30bf\u306e\u8981\u7d04\u7d71\u8a08\u91cf\u3092\u8a08\u7b97\u3057\u305f\u308a\u3001\u5909\u6570\u9593\u306e\u95a2\u4fc2\u6027\u3092\u8abf\u3079\u305f\u308a\u3059\u308b\u969b\u306b\u3082\u3001numpy\u306f\u5927\u6d3b\u8e8d\u3057\u307e\u3059\u3002<span class=\"keiko_yellow\">\u5e73\u5747\u5024\u3001\u4e2d\u592e\u5024\u3001\u6a19\u6e96\u504f\u5dee\u3068\u3044\u3063\u305f\u57fa\u672c\u7684\u306a\u7d71\u8a08\u91cf\u306f\u3001np.mean()\u3001np.median()\u3001np.std()\u306a\u3069\u306e\u95a2\u6570\u3067\u7c21\u5358\u306b\u6c42\u3081\u3089\u308c\u307e\u3059\u3002<\/span><\/p>\n\n\n\n<p>\u307e\u305f\u3001\u76f8\u95a2\u4fc2\u6570\u3092\u8a08\u7b97\u3059\u308bnp.corrcoef()\u3084\u3001\u884c\u5217\u306e\u6f14\u7b97\u306b\u4f7f\u308f\u308c\u308bnp.linalg.inv()\u3001np.linalg.eig()\u306a\u3069\u3001\u7dda\u5f62\u4ee3\u6570\u306e\u8a08\u7b97\u306b\u3082\u6b20\u304b\u305b\u306a\u3044\u95a2\u6570\u304c\u63c3\u3063\u3066\u3044\u307e\u3059\u3002<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">import numpy as np\n\n# \u30c7\u30fc\u30bf\u306e\u8981\u7d04\u7d71\u8a08\u91cf\u3092\u8a08\u7b97\nprint(np.mean(data))  # \u5e73\u5747\u5024\nprint(np.median(data))  # \u4e2d\u592e\u5024 \nprint(np.std(data))  # \u6a19\u6e96\u504f\u5dee\n\n# \u76f8\u95a2\u4fc2\u6570\u3092\u8a08\u7b97\ncorr_matrix = np.corrcoef(data.T)\nprint(corr_matrix)\n\n# \u884c\u5217\u306e\u9006\u884c\u5217\u3092\u8a08\u7b97\ninv_matrix = np.linalg.inv(data)\nprint(inv_matrix)\n\n# \u56fa\u6709\u5024\u3068\u56fa\u6709\u30d9\u30af\u30c8\u30eb\u3092\u8a08\u7b97\neigenvalues, eigenvectors = np.linalg.eig(data)\nprint(eigenvalues)\nprint(eigenvectors)<\/pre>\n\n\n\n<p>\u3053\u308c\u3089\u306e\u95a2\u6570\u3092\u4f7f\u3044\u3053\u306a\u3059\u3053\u3068\u3067\u3001\u30c7\u30fc\u30bf\u306e\u7279\u5fb4\u3092\u7d20\u65e9\u304f\u628a\u63e1\u3057\u3001\u5206\u6790\u306e\u65b9\u5411\u6027\u3092\u5b9a\u3081\u308b\u3053\u3068\u304c\u3067\u304d\u308b\u3067\u3057\u3087\u3046\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"i-10\">\u6a5f\u68b0\u5b66\u7fd2\u306b\u304a\u3051\u308bnumpy\u306e\u4f7f\u3044\u65b9<\/h3>\n\n\n\n<p>\u6a5f\u68b0\u5b66\u7fd2\u306e\u30a2\u30eb\u30b4\u30ea\u30ba\u30e0\u3092\u5b9f\u88c5\u3059\u308b\u969b\u306b\u3082\u3001numpy\u306f\u6b20\u304b\u305b\u306a\u3044\u30c4\u30fc\u30eb\u3068\u306a\u308a\u307e\u3059\u3002scikit-learn\u306a\u3069\u306e\u6a5f\u68b0\u5b66\u7fd2\u30e9\u30a4\u30d6\u30e9\u30ea\u3067\u306f\u3001\u5185\u90e8\u7684\u306bnumpy\u304c\u4f7f\u308f\u308c\u3066\u304a\u308a\u3001\u30c7\u30fc\u30bf\u306e\u524d\u51e6\u7406\u304b\u3089\u5b66\u7fd2\u3001\u8a55\u4fa1\u306b\u81f3\u308b\u307e\u3067\u3001\u3042\u3089\u3086\u308b\u5834\u9762\u3067ndarray\u304c\u6d3b\u8e8d\u3057\u3066\u3044\u307e\u3059\u3002<\/p>\n\n\n\n<p>\u307e\u305f\u3001\u52fe\u914d\u964d\u4e0b\u6cd5\u306a\u3069\u306e\u6700\u9069\u5316\u30a2\u30eb\u30b4\u30ea\u30ba\u30e0\u3092\u81ea\u5206\u3067\u5b9f\u88c5\u3059\u308b\u969b\u306b\u306f\u3001numpy\u306e\u914d\u5217\u8a08\u7b97\u304c\u5a01\u529b\u3092\u767a\u63ee\u3057\u307e\u3059\u3002\u30cb\u30e5\u30fc\u30e9\u30eb\u30cd\u30c3\u30c8\u30ef\u30fc\u30af\u306e\u8aa4\u5dee\u9006\u4f1d\u64ad\u3084\u91cd\u307f\u306e\u66f4\u65b0\u3067\u306f\u3001\u884c\u5217\u7a4d\u3084\u8981\u7d20\u3054\u3068\u306e\u6f14\u7b97\u304c\u983b\u7e41\u306b\u767b\u5834\u3057\u307e\u3059\u304c\u3001numpy\u3092\u4f7f\u3048\u3070\u305d\u308c\u3089\u3092\u9ad8\u901f\u304b\u3064\u7c21\u6f54\u306b\u8a18\u8ff0\u3067\u304d\u307e\u3059\u3002<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">import numpy as np\n\n# \u52fe\u914d\u964d\u4e0b\u6cd5\u306e\u5b9f\u88c5\u4f8b\ndef gradient_descent(X, y, learning_rate, num_iterations):\n    m, n = X.shape\n    theta = np.zeros(n)\n\n    for _ in range(num_iterations):\n        gradients = np.dot(X.T, np.dot(X, theta) - y) \/ m\n        theta -= learning_rate * gradients\n\n    return theta\n\n# \u30c0\u30df\u30fc\u30c7\u30fc\u30bf\u306e\u751f\u6210\nX = np.random.rand(100, 3)\ny = 2 + 3 * X[:, 0] - 2 * X[:, 1] + np.random.randn(100)\n\n# \u52fe\u914d\u964d\u4e0b\u6cd5\u306e\u9069\u7528\ntheta = gradient_descent(X, y, learning_rate=0.01, num_iterations=1000)\nprint(theta)<\/pre>\n\n\n\n<p>\u3053\u306e\u3088\u3046\u306b\u3001\u6a5f\u68b0\u5b66\u7fd2\u306e\u7406\u8ad6\u3092\u7406\u89e3\u3057\u3001\u30a2\u30eb\u30b4\u30ea\u30ba\u30e0\u3092\u5b9f\u88c5\u3059\u308b\u4e0a\u3067\u3082\u3001numpy\u306f\u5fc5\u9808\u306e\u30b9\u30ad\u30eb\u3068\u8a00\u3048\u307e\u3059\u3002<\/p>\n\n\n\n<p>\u30c7\u30fc\u30bf\u51e6\u7406\u306e\u3042\u3089\u3086\u308b\u5834\u9762\u3067numpy\u3092\u6d3b\u7528\u3059\u308b\u3053\u3068\u3067\u3001\u52b9\u7387\u7684\u304b\u3064\u9ad8\u5ea6\u306a\u30c7\u30fc\u30bf\u5206\u6790\u304c\u53ef\u80fd\u306b\u306a\u308a\u307e\u3059\u3002\u6b21\u306e\u7ae0\u3067\u306f\u3001\u5927\u898f\u6a21\u30c7\u30fc\u30bf\u3092\u6271\u3046\u969b\u306e\u30e1\u30e2\u30ea\u4f7f\u7528\u91cf\u306e\u6700\u9069\u5316\u306b\u3064\u3044\u3066\u3001\u8a73\u3057\u304f\u898b\u3066\u3044\u304d\u307e\u3057\u3087\u3046\u3002<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"i-11\">numpy\u3067\u30e1\u30e2\u30ea\u4f7f\u7528\u91cf\u3092\u6700\u9069\u5316\u3059\u308b\u65b9\u6cd5<\/h2>\n\n\n\n<p>\u5927\u898f\u6a21\u306a\u30c7\u30fc\u30bf\u3092\u6271\u3046\u969b\u306b\u306f\u3001\u30e1\u30e2\u30ea\u4f7f\u7528\u91cf\u306e\u6700\u9069\u5316\u304c\u6b20\u304b\u305b\u307e\u305b\u3093\u3002\u30c7\u30fc\u30bf\u91cf\u304c\u5897\u3048\u308b\u307b\u3069\u3001\u30e1\u30e2\u30ea\u306e\u5236\u7d04\u304c\u5206\u6790\u306e\u52b9\u7387\u3084\u53ef\u80fd\u6027\u3092\u5de6\u53f3\u3059\u308b\u304b\u3089\u3067\u3059\u3002\u3053\u306e\u7ae0\u3067\u306f\u3001numpy\u3092\u4f7f\u3063\u3066\u30e1\u30e2\u30ea\u4f7f\u7528\u91cf\u3092\u6700\u9069\u5316\u3059\u308b\u305f\u3081\u306e\u30b3\u30c4\u3068\u30d9\u30b9\u30c8\u30d7\u30e9\u30af\u30c6\u30a3\u30b9\u3092\u7d39\u4ecb\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"i-12\">\u30e1\u30e2\u30ea\u4f7f\u7528\u91cf\u3092\u524a\u6e1b\u3059\u308b\u30b3\u30c4<\/h3>\n\n\n\n<p>\u30e1\u30e2\u30ea\u4f7f\u7528\u91cf\u3092\u524a\u6e1b\u3059\u308b\u6700\u3082\u7c21\u5358\u306a\u65b9\u6cd5\u306f\u3001\u9069\u5207\u306a\u30c7\u30fc\u30bf\u578b\u3092\u9078\u629e\u3059\u308b\u3053\u3068\u3067\u3059\u3002\u4f8b\u3048\u3070\u3001\u6574\u6570\u306e\u7bc4\u56f2\u304c\u9650\u5b9a\u3055\u308c\u3066\u3044\u308b\u5834\u5408\u3001<code>int8<\/code>\u3084<code>int16<\/code>\u3068\u3044\u3063\u305f\u5c0f\u3055\u3044\u30c7\u30fc\u30bf\u578b\u3092\u4f7f\u3046\u3053\u3068\u3067\u3001\u30e1\u30e2\u30ea\u4f7f\u7528\u91cf\u3092\u5927\u5e45\u306b\u7bc0\u7d04\u3067\u304d\u307e\u3059\u3002\u6d6e\u52d5\u5c0f\u6570\u70b9\u6570\u306e\u5834\u5408\u3082\u3001\u5fc5\u8981\u306a\u7cbe\u5ea6\u306b\u5fdc\u3058\u3066<code>float16<\/code>\u3084<code>float32<\/code>\u3092\u4f7f\u3044\u5206\u3051\u308b\u3053\u3068\u304c\u5927\u5207\u3067\u3059\u3002<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">import numpy as np\n\n# \u30c7\u30fc\u30bf\u578b\u3092\u9069\u5207\u306b\u9078\u629e\ndata_int8 = np.array([1, 2, 3], dtype=np.int8)\ndata_float32 = np.array([1.0, 2.0, 3.0], dtype=np.float32)<\/pre>\n\n\n\n<p>\u307e\u305f\u3001\u30d3\u30e5\u30fc\uff08\u53c2\u7167\uff09\u3092\u6d3b\u7528\u3059\u308b\u3053\u3068\u3067\u3001\u30c7\u30fc\u30bf\u306e\u30b3\u30d4\u30fc\u3092\u907f\u3051\u3001\u30e1\u30e2\u30ea\u4f7f\u7528\u91cf\u3092\u6291\u3048\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<code>ndarray.view()<\/code>\u30e1\u30bd\u30c3\u30c9\u3092\u4f7f\u3048\u3070\u3001\u5143\u306e\u914d\u5217\u3068\u540c\u3058\u30c7\u30fc\u30bf\u3092\u53c2\u7167\u3059\u308b\u65b0\u3057\u3044\u914d\u5217\u3092\u4f5c\u6210\u3067\u304d\u307e\u3059\u3002\u30b9\u30e9\u30a4\u30b9\u3092\u4f7f\u3063\u3066\u914d\u5217\u306e\u4e00\u90e8\u3092\u53d6\u5f97\u3059\u308b\u969b\u3082\u3001\u30b3\u30d4\u30fc\u3067\u306f\u306a\u304f\u30d3\u30e5\u30fc\u304c\u8fd4\u3055\u308c\u307e\u3059\u3002<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\"># \u30d3\u30e5\u30fc\u3092\u6d3b\u7528\ndata = np.array([1, 2, 3, 4, 5])\nview = data[1:4]  # \u30d3\u30e5\u30fc\u3092\u4f5c\u6210\nview[0] = 10  # \u30d3\u30e5\u30fc\u3092\u5909\u66f4\u3059\u308b\u3068\u3001\u5143\u306e\u914d\u5217\u3082\u5909\u66f4\u3055\u308c\u308b\nprint(data)  # [1, 10, 3, 4, 5]<\/pre>\n\n\n\n<p>\u3055\u3089\u306b\u3001\u30e1\u30e2\u30ea\u30de\u30c3\u30d7\u3092\u4f7f\u3046\u3053\u3068\u3067\u3001\u5927\u898f\u6a21\u306a\u30c7\u30fc\u30bf\u3092\u30c7\u30a3\u30b9\u30af\u306b\u4fdd\u5b58\u3057\u3064\u3064\u3001\u52b9\u7387\u7684\u306b\u8aad\u307f\u66f8\u304d\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<code>np.memmap()<\/code>\u3092\u4f7f\u3048\u3070\u3001\u30c7\u30a3\u30b9\u30af\u4e0a\u306e\u30d0\u30a4\u30ca\u30ea\u30d5\u30a1\u30a4\u30eb\u3092\u914d\u5217\u3068\u3057\u3066\u6271\u3046\u3053\u3068\u304c\u3067\u304d\u3001\u30e1\u30e2\u30ea\u306b\u53ce\u307e\u3089\u306a\u3044\u5927\u304d\u3055\u306e\u30c7\u30fc\u30bf\u3092\u51e6\u7406\u3067\u304d\u308b\u3088\u3046\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\"># \u30e1\u30e2\u30ea\u30de\u30c3\u30d7\u3092\u4f7f\u7528\ndata_memmap = np.memmap('data.bin', dtype=np.float64, mode='w+', shape=(1000, 1000))\ndata_memmap[0, 0] = 1.0  # \u30c7\u30a3\u30b9\u30af\u4e0a\u306e\u30d5\u30a1\u30a4\u30eb\u306b\u66f8\u304d\u8fbc\u307e\u308c\u308b\ndel data_memmap  # \u30e1\u30e2\u30ea\u30de\u30c3\u30d7\u3092\u9589\u3058\u308b<\/pre>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"i-13\">\u5927\u898f\u6a21\u30c7\u30fc\u30bf\u3092\u6271\u3046\u969b\u306e\u30d9\u30b9\u30c8\u30d7\u30e9\u30af\u30c6\u30a3\u30b9<\/h3>\n\n\n\n<p>\u5927\u898f\u6a21\u30c7\u30fc\u30bf\u3092\u6271\u3046\u969b\u306b\u306f\u3001\u30c7\u30fc\u30bf\u3092\u8aad\u307f\u8fbc\u3080\u524d\u306b\u3001\u5fc5\u8981\u306a\u5217\u3084\u884c\u3092\u7d5e\u308a\u8fbc\u3080\u3053\u3068\u304c\u91cd\u8981\u3067\u3059\u3002\u3053\u308c\u306b\u3088\u308a\u3001\u30e1\u30e2\u30ea\u4f7f\u7528\u91cf\u3092\u6700\u5c0f\u9650\u306b\u6291\u3048\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002\u307e\u305f\u3001\u53ef\u80fd\u306a\u9650\u308a\u30a4\u30f3\u30d7\u30ec\u30fc\u30b9\u64cd\u4f5c\uff08\u5143\u306e\u914d\u5217\u3092\u4e0a\u66f8\u304d\u3059\u308b\u64cd\u4f5c\uff09\u3092\u4f7f\u3046\u3053\u3068\u3067\u3001\u65b0\u3057\u3044\u914d\u5217\u306e\u4f5c\u6210\u3092\u907f\u3051\u3001\u30e1\u30e2\u30ea\u306e\u7bc0\u7d04\u306b\u3064\u306a\u3052\u3089\u308c\u307e\u3059\u3002<\/p>\n\n\n\n<p>\u4e2d\u9593\u7d50\u679c\u3092\u4fdd\u6301\u305b\u305a\u3001\u30b9\u30c8\u30ea\u30fc\u30df\u30f3\u30b0\u51e6\u7406\u3092\u884c\u3046\u3053\u3068\u3082\u3001\u30e1\u30e2\u30ea\u4f7f\u7528\u91cf\u3092\u6291\u3048\u308b\u305f\u3081\u306e\u6709\u52b9\u306a\u624b\u6bb5\u3067\u3059\u3002\u5927\u898f\u6a21\u306a\u30c7\u30fc\u30bf\u3092\u4e00\u5ea6\u306b\u30e1\u30e2\u30ea\u306b\u8aad\u307f\u8fbc\u3080\u306e\u3067\u306f\u306a\u304f\u3001\u30c1\u30e3\u30f3\u30af\u306b\u5206\u5272\u3057\u3066\u9010\u6b21\u51e6\u7406\u3059\u308b\u3053\u3068\u3067\u3001\u30e1\u30e2\u30ea\u4f7f\u7528\u91cf\u3092\u6700\u5c0f\u9650\u306b\u6291\u3048\u3089\u308c\u307e\u3059\u3002<\/p>\n\n\n\n<p>\u3055\u3089\u306b\u3001\u4e26\u5217\u51e6\u7406\u3092\u6d3b\u7528\u3059\u308b\u3053\u3068\u3067\u3001\u5927\u898f\u6a21\u30c7\u30fc\u30bf\u3092\u5206\u5272\u3057\u3066\u51e6\u7406\u3057\u3001\u30e1\u30e2\u30ea\u4f7f\u7528\u91cf\u3092\u5206\u6563\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002numpy\u306f\u3001<code>numpy.split()<\/code>\u306a\u3069\u306e\u95a2\u6570\u3092\u4f7f\u3063\u3066\u914d\u5217\u3092\u5206\u5272\u3057\u3001<code>multiprocessing<\/code>\u30e2\u30b8\u30e5\u30fc\u30eb\u306a\u3069\u3092\u4f7f\u3063\u3066\u4e26\u5217\u51e6\u7406\u3092\u884c\u3046\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<\/p>\n\n\n\n<p>\u3053\u308c\u3089\u306e\u30c6\u30af\u30cb\u30c3\u30af\u3092\u9069\u5207\u306b\u7d44\u307f\u5408\u308f\u305b\u308b\u3053\u3068\u3067\u3001\u5927\u898f\u6a21\u306a\u30c7\u30fc\u30bf\u3092\u6271\u3046\u969b\u306e\u30e1\u30e2\u30ea\u4f7f\u7528\u91cf\u3092\u6700\u9069\u5316\u3057\u3001\u52b9\u7387\u7684\u306a\u5206\u6790\u3092\u5b9f\u73fe\u3067\u304d\u308b\u3067\u3057\u3087\u3046\u3002\u30e1\u30e2\u30ea\u4f7f\u7528\u91cf\u306e\u6700\u9069\u5316\u306f\u3001\u30c7\u30fc\u30bf\u30b5\u30a4\u30a8\u30f3\u30c6\u30a3\u30b9\u30c8\u306b\u3068\u3063\u3066\u5fc5\u9808\u306e\u30b9\u30ad\u30eb\u3067\u3059\u3002numpy\u3092\u4f7f\u3044\u3053\u306a\u3059\u3053\u3068\u3067\u3001\u305d\u306e\u30b9\u30ad\u30eb\u3092\u5927\u304d\u304f\u5411\u4e0a\u3055\u305b\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<\/p>\n\n\n\n<p>\u6b21\u306e\u7ae0\u3067\u306f\u3001numpy\u3092\u3055\u3089\u306b\u6df1\u304f\u7406\u89e3\u3057\u3001\u6d3b\u7528\u3059\u308b\u305f\u3081\u306e\u53c2\u8003\u60c5\u5831\u3092\u7d39\u4ecb\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"i-14\">numpy\u3092\u4f7f\u3044\u3053\u306a\u3059\u305f\u3081\u306e\u53c2\u8003\u60c5\u5831<\/h2>\n\n\n\n<p>\u3053\u3053\u307e\u3067\u306e\u7ae0\u3067\u3001numpy\u306e\u57fa\u672c\u7684\u306a\u4f7f\u3044\u65b9\u304b\u3089\u5b9f\u8df5\u7684\u306a\u30c6\u30af\u30cb\u30c3\u30af\u307e\u3067\u3001\u5e45\u5e83\u304f\u5b66\u3093\u3067\u304d\u307e\u3057\u305f\u3002\u3057\u304b\u3057\u3001numpy\u3092\u771f\u306b\u4f7f\u3044\u3053\u306a\u3059\u305f\u3081\u306b\u306f\u3001\u3055\u3089\u306a\u308b\u5b66\u7fd2\u3068\u63a2\u6c42\u304c\u6b20\u304b\u305b\u307e\u305b\u3093\u3002\u3053\u306e\u7ae0\u3067\u306f\u3001numpy\u3092\u6df1\u304f\u7406\u89e3\u3057\u3001\u30a8\u30ad\u30b9\u30d1\u30fc\u30c8\u30ec\u30d9\u30eb\u3067\u6d3b\u7528\u3059\u308b\u305f\u3081\u306e\u53c2\u8003\u60c5\u5831\u3092\u7d39\u4ecb\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"i-15\">\u516c\u5f0f\u30c9\u30ad\u30e5\u30e1\u30f3\u30c8\u3068\u5b66\u7fd2\u30ea\u30bd\u30fc\u30b9<\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li>numpy\u306e\u516c\u5f0f\u30c9\u30ad\u30e5\u30e1\u30f3\u30c8\uff08<a href=\"https:\/\/numpy.org\/doc\/\">https:\/\/numpy.org\/doc\/<\/a>\uff09\u306f\u3001API\u30ea\u30d5\u30a1\u30ec\u30f3\u30b9\u3084\u30e6\u30fc\u30b6\u30fc\u30ac\u30a4\u30c9\u306a\u3069\u3001\u8c4a\u5bcc\u306a\u60c5\u5831\u3092\u63d0\u4f9b\u3057\u3066\u3044\u307e\u3059\u3002<\/li>\n\n\n\n<li>\u7279\u306b\u3001\u521d\u5fc3\u8005\u306b\u3082\u308f\u304b\u308a\u3084\u3059\u3044\u516c\u5f0f\u30c1\u30e5\u30fc\u30c8\u30ea\u30a2\u30eb\uff08<a href=\"https:\/\/numpy.org\/numpy-tutorials\/\">https:\/\/numpy.org\/numpy-tutorials\/<\/a>\uff09\u306f\u3001numpy\u306e\u57fa\u790e\u3092\u4f53\u7cfb\u7684\u306b\u5b66\u3076\u306e\u306b\u6700\u9069\u3067\u3059\u3002<\/li>\n\n\n\n<li>\u307e\u305f\u3001GitHub\u4e0a\u306b\u306f\u3001numpy\u3092\u4f7f\u3063\u305f\u30b5\u30f3\u30d7\u30eb\u30b3\u30fc\u30c9\u3084\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u304c\u6570\u591a\u304f\u516c\u958b\u3055\u308c\u3066\u3044\u307e\u3059\u3002\u4f8b\u3048\u3070\u3001\u516c\u5f0f\u306e\u30c1\u30e5\u30fc\u30c8\u30ea\u30a2\u30eb\u30ea\u30dd\u30b8\u30c8\u30ea\uff08<a href=\"https:\/\/github.com\/numpy\/numpy-tutorials\">https:\/\/github.com\/numpy\/numpy-tutorials<\/a>\uff09\u3067\u306f\u3001\u5b9f\u8df5\u7684\u306a\u30b5\u30f3\u30d7\u30eb\u30b3\u30fc\u30c9\u3092\u898b\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<\/li>\n\n\n\n<li><\/li>\n\n\n\n<li><\/li>\n<\/ul>\n\n\n\n<p>\u3053\u308c\u3089\u306e\u30ea\u30bd\u30fc\u30b9\u3092\u6d3b\u7528\u3059\u308b\u3053\u3068\u3067\u3001numpy\u306e\u4f7f\u3044\u65b9\u3092\u52b9\u679c\u7684\u306b\u5b66\u3076\u3053\u3068\u304c\u3067\u304d\u308b\u3067\u3057\u3087\u3046\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"i-16\">numpy\u306e\u30a8\u30b3\u30b7\u30b9\u30c6\u30e0\u3068\u95a2\u9023\u30e9\u30a4\u30d6\u30e9\u30ea<\/h3>\n\n\n\n<p>numpy\u306f\u3001\u30c7\u30fc\u30bf\u30b5\u30a4\u30a8\u30f3\u30b9\u3084\u6a5f\u68b0\u5b66\u7fd2\u306e\u30a8\u30b3\u30b7\u30b9\u30c6\u30e0\u306e\u4e2d\u6838\u3092\u306a\u3059\u30e9\u30a4\u30d6\u30e9\u30ea\u3067\u3059\u3002numpy\u3068\u9023\u643a\u3057\u3066\u4f7f\u308f\u308c\u308b\u3053\u3068\u304c\u591a\u3044\u95a2\u9023\u30e9\u30a4\u30d6\u30e9\u30ea\u3092\u7406\u89e3\u3059\u308b\u3053\u3068\u3067\u3001\u30c7\u30fc\u30bf\u5206\u6790\u306e\u30ef\u30fc\u30af\u30d5\u30ed\u30fc\u3092\u30b9\u30e0\u30fc\u30ba\u306b\u9032\u3081\u3089\u308c\u308b\u3088\u3046\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n\n\n\n<p>\u4e3b\u306a\u95a2\u9023\u30e9\u30a4\u30d6\u30e9\u30ea\u3068\u3057\u3066\u306f\u3001\u4ee5\u4e0b\u306e\u3088\u3046\u306a\u3082\u306e\u304c\u3042\u308a\u307e\u3059\uff1a<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>pandas: \u30c7\u30fc\u30bf\u5206\u6790\u30e9\u30a4\u30d6\u30e9\u30ea\u3002numpy\u306e\u914d\u5217\u3092\u57fa\u790e\u306b\u3057\u305fDataFrame\u3092\u63d0\u4f9b\u3057\u3001\u30c7\u30fc\u30bf\u306e\u8aad\u307f\u8fbc\u307f\u3084\u52a0\u5de5\u3001\u96c6\u8a08\u306a\u3069\u3092\u884c\u3044\u307e\u3059\u3002<\/li>\n\n\n\n<li>matplotlib: \u30c7\u30fc\u30bf\u53ef\u8996\u5316\u30e9\u30a4\u30d6\u30e9\u30ea\u3002numpy\u306e\u914d\u5217\u3092\u4f7f\u3063\u3066\u30b0\u30e9\u30d5\u3084\u30d7\u30ed\u30c3\u30c8\u3092\u4f5c\u6210\u3057\u307e\u3059\u3002<\/li>\n\n\n\n<li>scikit-learn: \u6a5f\u68b0\u5b66\u7fd2\u30e9\u30a4\u30d6\u30e9\u30ea\u3002numpy\u306e\u914d\u5217\u3092\u4f7f\u3063\u3066\u30c7\u30fc\u30bf\u306e\u524d\u51e6\u7406\u3084\u7279\u5fb4\u91cf\u62bd\u51fa\u3001\u30e2\u30c7\u30eb\u306e\u5b66\u7fd2\u3068\u8a55\u4fa1\u3092\u884c\u3044\u307e\u3059\u3002<\/li>\n\n\n\n<li>scipy: \u79d1\u5b66\u8a08\u7b97\u30e9\u30a4\u30d6\u30e9\u30ea\u3002numpy\u306e\u914d\u5217\u3092\u4f7f\u3063\u3066\u3001\u6700\u9069\u5316\u3001\u4fe1\u53f7\u51e6\u7406\u3001\u7d71\u8a08\u5206\u5e03\u306a\u3069\u3001\u9ad8\u5ea6\u306a\u6570\u5b66\u8a08\u7b97\u3092\u5b9f\u884c\u3057\u307e\u3059\u3002<\/li>\n<\/ul>\n\n\n\n<p>\u3053\u308c\u3089\u306e\u30e9\u30a4\u30d6\u30e9\u30ea\u3092\u7d44\u307f\u5408\u308f\u305b\u308b\u3053\u3068\u3067\u3001\u30c7\u30fc\u30bf\u306e\u53d6\u5f97\u304b\u3089\u524d\u51e6\u7406\u3001\u5206\u6790\u3001\u30e2\u30c7\u30eb\u5316\u3001\u53ef\u8996\u5316\u307e\u3067\u306e\u4e00\u9023\u306e\u6d41\u308c\u3092\u3001\u30b7\u30fc\u30e0\u30ec\u30b9\u306b\u5b9f\u88c5\u3067\u304d\u307e\u3059\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"i-17\">\u30d7\u30ed\u306e\u30c7\u30fc\u30bf\u30b5\u30a4\u30a8\u30f3\u30c6\u30a3\u30b9\u30c8\u306b\u3088\u308b\u4f7f\u3044\u65b9\u306e\u5b9f\u4f8b<\/h3>\n\n\n\n<p>numpy\u306f\u3001\u73fe\u5834\u306e\u30c7\u30fc\u30bf\u30b5\u30a4\u30a8\u30f3\u30c6\u30a3\u30b9\u30c8\u306b\u3082\u5e83\u304f\u4f7f\u308f\u308c\u3066\u3044\u307e\u3059\u3002\u5f7c\u3089\u306e\u4f7f\u3044\u65b9\u3092\u5b66\u3076\u3053\u3068\u3067\u3001\u5b9f\u8df5\u7684\u306a\u30b9\u30ad\u30eb\u3092\u8eab\u306b\u3064\u3051\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<\/p>\n\n\n\n<p>\u4f8b\u3048\u3070\u3001Kaggle\u306e\u30b3\u30f3\u30da\u30c6\u30a3\u30b7\u30e7\u30f3\u3067\u306f\u3001\u4e0a\u4f4d\u5165\u8cde\u8005\u306e\u591a\u304f\u304cnumpy\u3092\u52b9\u679c\u7684\u306b\u6d3b\u7528\u3057\u3066\u3044\u307e\u3059\u3002Titanic\u30b3\u30f3\u30da\u30c6\u30a3\u30b7\u30e7\u30f3\u306e\u4e0a\u4f4d\u89e3\u7b54\u3067\u306f\u3001numpy\u3092\u4f7f\u3063\u3066\u30c7\u30fc\u30bf\u306e\u524d\u51e6\u7406\u3084\u7279\u5fb4\u91cf\u30a8\u30f3\u30b8\u30cb\u30a2\u30ea\u30f3\u30b0\u3092\u884c\u3063\u3066\u3044\u307e\u3059\uff08<a href=\"https:\/\/www.kaggle.com\/startupsci\/titanic-data-science-solutions\">https:\/\/www.kaggle.com\/startupsci\/titanic-data-science-solutions<\/a>\uff09\u3002<\/p>\n\n\n\n<p>\u3053\u306e\u3088\u3046\u306b\u3001numpy\u306f\u5b9f\u969b\u306e\u30c7\u30fc\u30bf\u30b5\u30a4\u30a8\u30f3\u30b9\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u306e\u4e2d\u3067\u6d3b\u8e8d\u3057\u3066\u3044\u307e\u3059\u3002\u516c\u958b\u3055\u308c\u3066\u3044\u308b\u4e8b\u4f8b\u3092\u53c2\u8003\u306b\u3057\u306a\u304c\u3089\u3001\u81ea\u5206\u306e\u554f\u984c\u306b\u9069\u7528\u3057\u3066\u3044\u304f\u3053\u3068\u304c\u3001\u30b9\u30ad\u30eb\u30a2\u30c3\u30d7\u3078\u306e\u8fd1\u9053\u3068\u306a\u308b\u3067\u3057\u3087\u3046\u3002<\/p>\n\n\n\n<p>numpy\u306f\u3001\u30c7\u30fc\u30bf\u30b5\u30a4\u30a8\u30f3\u30b9\u306e\u4e16\u754c\u3067\u6b20\u304b\u305b\u306a\u3044\u30c4\u30fc\u30eb\u3067\u3059\u3002\u516c\u5f0f\u30c9\u30ad\u30e5\u30e1\u30f3\u30c8\u3084\u5b66\u7fd2\u30ea\u30bd\u30fc\u30b9\u3092\u6d3b\u7528\u3057\u3001\u95a2\u9023\u30e9\u30a4\u30d6\u30e9\u30ea\u3068\u306e\u30a8\u30b3\u30b7\u30b9\u30c6\u30e0\u3092\u7406\u89e3\u3057\u3001\u30d7\u30ed\u306e\u4f7f\u3044\u65b9\u3092\u53c2\u8003\u306b\u3057\u306a\u304c\u3089\u3001numpy\u3092\u4f7f\u3044\u3053\u306a\u3059\u529b\u3092\u8eab\u306b\u3064\u3051\u3066\u3044\u304d\u307e\u3057\u3087\u3046\u3002<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"i-18\">\u516c\u5f0f\u30c9\u30ad\u30e5\u30e1\u30f3\u30c8<\/h2>\n\n\n\n<div class=\"wp-block-sgb-sanko\"><a href=\"https:\/\/numpy.org\/doc\/\" class=\"sgb-e-link sgb-e-link--vertical sgb-e-link--left\" target=\"_blank\" rel=\"noopener noreferrer\"><div class=\"sgb-e-link__text\"><span class=\"sgb-e-link__catchy\">\u53c2\u8003<\/span><div class=\"sgb-e-link__title\">NumPy Documentation<\/div><div class=\"sgb-e-link__sitename\"><\/div><\/div><\/a><\/div>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"i-19\">\u95a2\u9023\u8a18\u4e8b<\/h2>\n\n\n<a class=\"linkto table\" href=\"https:\/\/chocottopro.com\/?p=850\"> <span class=\"tbcell tbimg\"><img loading=\"lazy\" decoding=\"async\" width=\"160\" height=\"160\" src=\"https:\/\/chocottopro.com\/wp-content\/uploads\/2024\/06\/numpy-random-160x160.jpg\" class=\"attachment-thumb-160 size-thumb-160 wp-post-image\" alt=\"\" srcset=\"https:\/\/chocottopro.com\/wp-content\/uploads\/2024\/06\/numpy-random-160x160.jpg 160w, https:\/\/chocottopro.com\/wp-content\/uploads\/2024\/06\/numpy-random-150x150.jpg 150w\" sizes=\"auto, (max-width: 160px) 100vw, 160px\"><\/span> <span class=\"tbcell tbtext\"> <time class=\"pubdate sng-link-time dfont\" itemprop=\"datePublished\" datetime=\"2024-06-02\">2024\u5e746\u67082\u65e5<\/time> \u3010\u521d\u5fc3\u8005\u5fc5\u898b\u3011numpy\u306erandom\u6a5f\u80fd\u3092\u4f7f\u3044\u3053\u306a\u305b\u3070\u3001Python\u3067\u306e\u4e71\u6570\u751f\u6210\u304c10\u500d\u697d\u306b\u306a\u308b\uff01 <\/span> <\/a>\n\n<a class=\"linkto table\" href=\"https:\/\/chocottopro.com\/?p=847\"> <span class=\"tbcell tbimg\"><img loading=\"lazy\" decoding=\"async\" width=\"160\" height=\"160\" src=\"https:\/\/chocottopro.com\/wp-content\/uploads\/2024\/06\/numpy-append-160x160.jpg\" class=\"attachment-thumb-160 size-thumb-160 wp-post-image\" alt=\"\" srcset=\"https:\/\/chocottopro.com\/wp-content\/uploads\/2024\/06\/numpy-append-160x160.jpg 160w, https:\/\/chocottopro.com\/wp-content\/uploads\/2024\/06\/numpy-append-150x150.jpg 150w\" sizes=\"auto, (max-width: 160px) 100vw, 160px\"><\/span> <span class=\"tbcell tbtext\"> <time class=\"pubdate sng-link-time dfont\" itemprop=\"datePublished\" datetime=\"2024-06-02\">2024\u5e746\u67082\u65e5<\/time> \u3010\u521d\u5fc3\u8005\u5411\u3051\u3011numpy\u306eappend\u95a2\u6570\u306e\u4f7f\u3044\u65b9\u30925\u3064\u306e\u30b5\u30f3\u30d7\u30eb\u30b3\u30fc\u30c9\u3067\u5fb9\u5e95\u89e3\u8aac\uff01 <\/span> <\/a>\n\n<a class=\"linkto table\" href=\"https:\/\/chocottopro.com\/?p=844\"> <span class=\"tbcell tbimg\"><img loading=\"lazy\" decoding=\"async\" width=\"160\" height=\"160\" src=\"https:\/\/chocottopro.com\/wp-content\/uploads\/2024\/06\/numpy-reshape-160x160.jpg\" class=\"attachment-thumb-160 size-thumb-160 wp-post-image\" alt=\"\" srcset=\"https:\/\/chocottopro.com\/wp-content\/uploads\/2024\/06\/numpy-reshape-160x160.jpg 160w, https:\/\/chocottopro.com\/wp-content\/uploads\/2024\/06\/numpy-reshape-150x150.jpg 150w\" sizes=\"auto, (max-width: 160px) 100vw, 160px\"><\/span> <span class=\"tbcell tbtext\"> <time class=\"pubdate sng-link-time dfont\" itemprop=\"datePublished\" datetime=\"2024-06-02\">2024\u5e746\u67082\u65e5<\/time> \u3010numpy\u5165\u9580\u3011\u308f\u304b\u308a\u3084\u3059\u3044\u56f3\u89e3\u3068\u30b3\u30fc\u30c9\u4f8b\u3067\u5fb9\u5e95\u89e3\u8aac\uff01reshape\u306e\u4f7f\u3044\u65b9\u3092\u30de\u30b9\u30bf\u30fc\u3057\u3088\u3046 <\/span> <\/a>\n\n<a class=\"linkto table\" href=\"https:\/\/chocottopro.com\/?p=805\"> <span class=\"tbcell tbimg\"><img loading=\"lazy\" decoding=\"async\" width=\"160\" height=\"160\" src=\"https:\/\/chocottopro.com\/wp-content\/uploads\/2024\/05\/numpy-zeros-160x160.jpg\" class=\"attachment-thumb-160 size-thumb-160 wp-post-image\" alt=\"\" srcset=\"https:\/\/chocottopro.com\/wp-content\/uploads\/2024\/05\/numpy-zeros-160x160.jpg 160w, https:\/\/chocottopro.com\/wp-content\/uploads\/2024\/05\/numpy-zeros-150x150.jpg 150w\" sizes=\"auto, (max-width: 160px) 100vw, 160px\"><\/span> <span class=\"tbcell tbtext\"> <time class=\"pubdate sng-link-time dfont\" itemprop=\"datePublished\" datetime=\"2024-05-26\">2024\u5e745\u670826\u65e5<\/time> \u3010\u521d\u5fc3\u8005\u5411\u3051\u3011numpy.zeros\u306e\u4f7f\u3044\u65b9\u3092\u5b9f\u8df5\u7684\u306a\u30b5\u30f3\u30d7\u30eb\u30b3\u30fc\u30c9\u4ed8\u304d\u3067\u5fb9\u5e95\u89e3\u8aac\uff01 <\/span> <\/a>\n\n<a class=\"linkto table\" href=\"https:\/\/chocottopro.com\/?p=803\"> <span class=\"tbcell tbimg\"><img loading=\"lazy\" decoding=\"async\" width=\"160\" height=\"160\" src=\"https:\/\/chocottopro.com\/wp-content\/uploads\/2024\/05\/numpy-linspace-160x160.jpg\" class=\"attachment-thumb-160 size-thumb-160 wp-post-image\" alt=\"\" srcset=\"https:\/\/chocottopro.com\/wp-content\/uploads\/2024\/05\/numpy-linspace-160x160.jpg 160w, https:\/\/chocottopro.com\/wp-content\/uploads\/2024\/05\/numpy-linspace-150x150.jpg 150w\" sizes=\"auto, (max-width: 160px) 100vw, 160px\"><\/span> <span class=\"tbcell tbtext\"> <time class=\"pubdate sng-link-time dfont\" itemprop=\"datePublished\" datetime=\"2024-05-26\">2024\u5e745\u670826\u65e5<\/time> \u3010\u5b8c\u5168\u7248\u3011NumPy linspace\u306e\u4f7f\u3044\u65b9\u3092\u5fb9\u5e95\u89e3\u8aac\uff01\u521d\u5fc3\u8005\u3067\u3082\u308f\u304b\u308b\u5177\u4f53\u4f8b5\u9078 <\/span> <\/a>\n\n<a class=\"linkto table\" href=\"https:\/\/chocottopro.com\/?p=801\"> <span class=\"tbcell tbimg\"><img loading=\"lazy\" decoding=\"async\" width=\"160\" height=\"160\" src=\"https:\/\/chocottopro.com\/wp-content\/uploads\/2024\/05\/numpy-array-1-160x160.jpg\" class=\"attachment-thumb-160 size-thumb-160 wp-post-image\" alt=\"\" srcset=\"https:\/\/chocottopro.com\/wp-content\/uploads\/2024\/05\/numpy-array-1-160x160.jpg 160w, https:\/\/chocottopro.com\/wp-content\/uploads\/2024\/05\/numpy-array-1-150x150.jpg 150w\" sizes=\"auto, (max-width: 160px) 100vw, 160px\"><\/span> <span class=\"tbcell tbtext\"> <time class=\"pubdate sng-link-time dfont\" itemprop=\"datePublished\" datetime=\"2024-05-26\">2024\u5e745\u670826\u65e5<\/time> \u3010\u521d\u5fc3\u8005\u5411\u3051\u3011numpy\u306earange\u95a2\u6570\u306e\u4f7f\u3044\u65b9\u3092\u5fb9\u5e95\u89e3\u8aac\uff01range\u95a2\u6570\u3068\u306e\u9055\u3044\u3082 <\/span> <\/a>\n\n<a class=\"linkto table\" href=\"https:\/\/chocottopro.com\/?p=791\"> <span class=\"tbcell tbimg\"><img loading=\"lazy\" decoding=\"async\" width=\"160\" height=\"160\" src=\"https:\/\/chocottopro.com\/wp-content\/uploads\/2024\/05\/numpy-where-160x160.jpg\" class=\"attachment-thumb-160 size-thumb-160 wp-post-image\" alt=\"\" srcset=\"https:\/\/chocottopro.com\/wp-content\/uploads\/2024\/05\/numpy-where-160x160.jpg 160w, https:\/\/chocottopro.com\/wp-content\/uploads\/2024\/05\/numpy-where-150x150.jpg 150w\" sizes=\"auto, (max-width: 160px) 100vw, 160px\"><\/span> <span class=\"tbcell tbtext\"> <time class=\"pubdate sng-link-time dfont\" itemprop=\"datePublished\" datetime=\"2024-05-19\">2024\u5e745\u670819\u65e5<\/time> \u3010\u5b8c\u5168\u7248\u3011Numpy where\u306e\u4f7f\u3044\u65b9\u3092\u5fb9\u5e95\u89e3\u8aac\uff0115\u306e\u30b3\u30fc\u30c9\u4f8b\u3067\u30de\u30b9\u30bf\u30fc\u3059\u308b <\/span> <\/a>\n\n<a class=\"linkto table\" href=\"https:\/\/chocottopro.com\/?p=788\"> <span class=\"tbcell tbimg\"><img loading=\"lazy\" decoding=\"async\" width=\"160\" height=\"160\" src=\"https:\/\/chocottopro.com\/wp-content\/uploads\/2024\/05\/numpy-array-160x160.jpg\" class=\"attachment-thumb-160 size-thumb-160 wp-post-image\" alt=\"\" srcset=\"https:\/\/chocottopro.com\/wp-content\/uploads\/2024\/05\/numpy-array-160x160.jpg 160w, https:\/\/chocottopro.com\/wp-content\/uploads\/2024\/05\/numpy-array-150x150.jpg 150w\" sizes=\"auto, (max-width: 160px) 100vw, 160px\"><\/span> <span class=\"tbcell tbtext\"> <time class=\"pubdate sng-link-time dfont\" itemprop=\"datePublished\" datetime=\"2024-05-15\">2024\u5e745\u670815\u65e5<\/time> \u3010\u56f3\u89e3\u3011NumPy Array\u306e\u57fa\u672c\u304b\u3089\u5fdc\u7528\u307e\u3067\uff01\u4f7f\u3044\u65b9\u30fb\u5b9f\u88c5\u4f8b\u304b\u3089\u5185\u90e8\u69cb\u9020\u306e\u7406\u89e3\u3068\u30d9\u30b9\u30c8\u30d7\u30e9\u30af\u30c6\u30a3\u30b9\u307e\u3067\u5b8c\u5168\u30ac\u30a4\u30c9 <\/span> <\/a>","protected":false},"excerpt":{"rendered":"<p>Python\u3067\u30c7\u30fc\u30bf\u30b5\u30a4\u30a8\u30f3\u30b9\u3084\u6a5f\u68b0\u5b66\u7fd2\u306b\u53d6\u308a\u7d44\u3080\u306a\u3089\u3001numpy\u306f\u5fc5\u9808\u306e\u30e9\u30a4\u30d6\u30e9\u30ea\u3067\u3059\u3002\u3053\u306e\u8a18\u4e8b\u3067\u306f\u3001numpy\u306e\u57fa\u672c\u7684\u306a\u6982\u5ff5\u304b\u3089\u5b9f\u8df5\u7684\u306a\u4f7f\u3044\u65b9\u307e\u3067\u3001\u521d\u5fc3\u8005\u3067\u3082\u308f\u304b\u308b\u3088\u3046\u306b\u5fb9\u5e95\u7684\u306b\u89e3\u8aac\u3057\u307e\u3059\u3002numpy\u3092\u4f7f\u3044\u3053\u306a\u3059\u3053\u3068 &#8230; <\/p>\n","protected":false},"author":1,"featured_media":600,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4],"tags":[],"class_list":{"0":"post-599","1":"post","2":"type-post","3":"status-publish","4":"format-standard","5":"has-post-thumbnail","7":"category-python"},"_links":{"self":[{"href":"https:\/\/chocottopro.com\/index.php?rest_route=\/wp\/v2\/posts\/599","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/chocottopro.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/chocottopro.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/chocottopro.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/chocottopro.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=599"}],"version-history":[{"count":4,"href":"https:\/\/chocottopro.com\/index.php?rest_route=\/wp\/v2\/posts\/599\/revisions"}],"predecessor-version":[{"id":892,"href":"https:\/\/chocottopro.com\/index.php?rest_route=\/wp\/v2\/posts\/599\/revisions\/892"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/chocottopro.com\/index.php?rest_route=\/wp\/v2\/media\/600"}],"wp:attachment":[{"href":"https:\/\/chocottopro.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=599"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/chocottopro.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=599"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/chocottopro.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=599"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}