{"version":"1.0","blog_url":"https://python-remrin.hatenadiary.jp/","published":"2017-05-16 22:09:38","author_url":"https://blog.hatena.ne.jp/rare_Remrin/","image_url":null,"html":"<iframe src=\"https://hatenablog-parts.com/embed?url=https%3A%2F%2Fpython-remrin.hatenadiary.jp%2Fentry%2F2017%2F05%2F16%2F220938\" title=\"NumPy\u306e\u4f7f\u3044\u65b9\uff08\uff11\uff17\uff09\u3000\u69cb\u9020\u5316\u914d\u5217 - Remrin\u306epython\u653b\u7565\u65e5\u8a18\" class=\"embed-card embed-blogcard\" scrolling=\"no\" frameborder=\"0\" style=\"display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;\"></iframe>","width":"100%","description":"NumPy\u306e\u69cb\u9020\u5316\u914d\u5217(structured array)\u306b\u3064\u3044\u3066\u3002 dtype\u3092\u81ea\u5206\u3067\u8a2d\u5b9a\u3057\u3066\u3001\u7570\u306a\u308b\u578b\u306e\u5909\u6570\u3092\u7e54\u308a\u8fbc\u3081\u308b\u3002 \u30d5\u30a3\u30fc\u30eb\u30c9\u540d\u3067\u8981\u7d20\u3092\u53c2\u7167\u3067\u304d\u308b\u3002 dtype = [(\"x\", int), (\"y\", float)] a1 = np.array([(1, 2), (3, 4), (5, 6)], dtype=dtype) print(a1) # [(1, 2.0) (3, 4.0) (5, 6.0)] print(a1[\"x\"]) # [1 3 5 ] print(a1[\"y\"]) # [ 2. 4. 6.] \u30d5\u30a3\u30fc\u30eb\u30c9\u306esize\u3092\u6307\u5b9a\u3057\u305f\u308a\u3082\u3067\u304d\u308b\u3002 dtype = [(\"x\"\u2026","url":"https://python-remrin.hatenadiary.jp/entry/2017/05/16/220938","provider_url":"https://hatena.blog","blog_title":"Remrin\u306epython\u653b\u7565\u65e5\u8a18","author_name":"rare_Remrin","type":"rich","title":"NumPy\u306e\u4f7f\u3044\u65b9\uff08\uff11\uff17\uff09\u3000\u69cb\u9020\u5316\u914d\u5217","categories":["numpy","python","\u30e9\u30a4\u30d6\u30e9\u30ea"],"provider_name":"Hatena Blog","height":"190"}