{"description":"numpy\u30ea\u30b9\u30c8\u306b\u304a\u3044\u3066\u3001\u30b3\u30ed\u30f3(:)\u3084\u30d4\u30ea\u30aa\u30c9(.)\u306e\u610f\u5473\u3092\u8aac\u660e\u3059\u308b\u3002 \u30b3\u30ed\u30f3 \u30b3\u30ed\u30f3\u306f\u3088\u304f[1, :]\u306e\u69d8\u306a\u5f62\u3067\u898b\u304b\u3051\u308b\u3002 :\u306f\u8a00\u3044\u63db\u3048\u308c\u3070\u3059\u3079\u3066\u3001\u3068\u3044\u3046\u610f\u5473\u3060\u3002 \u3088\u3063\u3066[1, :]\u3067\u306f[1,0]\u3001[1,1]\u3001[1,2]\u306a\u3069\u3092\u8fd4\u3059\u3002 \u4ee5\u4e0b\u306e\u69d8\u306a\u30d7\u30ed\u30b0\u30e9\u30e0\u3092\u5b9f\u884c\u3059\u308b\u3002 import numpy as np my_list = np.array([[0,1,0],[2,3,0],[4,5,0]]) print(my_list[1,:]) \u3059\u308b\u3068\u4ee5\u4e0b\u306e\u7d50\u679c\u3092\u5f97\u308b\u3002 [2 3 0] \u30d4\u30ea\u30aa\u30c9 \u30d4\u30ea\u30aa\u30c9\u306f\u4f8b\u3048\u3070 b = a[..., 0] \u306e\u69d8\u306b\u4f7f\u308f\u308c\u308b\u3002 \u3053\u308c\u3082\u5b9f\u306f\u5168\u3066\u3068\u3044\u3046\u610f\u5473\u3067\u3001\u9014\u4e2d\u306e\u30ab\u30f3\u30de(\u2026","author_url":"https://blog.hatena.ne.jp/jskangaroo/","provider_url":"https://hatena.blog","type":"rich","width":"100%","html":"<iframe src=\"https://hatenablog-parts.com/embed?url=https%3A%2F%2Fjskangaroo.hatenablog.com%2Fentry%2F2020%2F10%2F14%2F230530\" title=\"numpy\u306e\u30ea\u30b9\u30c8\u306b\u304a\u3044\u3066\u3053\u306e\u69d8\u306a\u70b9\u3005(\u30b3\u30ed\u30f3\u3001\u30d4\u30ea\u30aa\u30c9)\u306e\u610f\u5473 [1,:] [1, ..., 1] - jskangaroo\u306e\u30d6\u30ed\u30b0\" class=\"embed-card embed-blogcard\" scrolling=\"no\" frameborder=\"0\" style=\"display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;\"></iframe>","title":"numpy\u306e\u30ea\u30b9\u30c8\u306b\u304a\u3044\u3066\u3053\u306e\u69d8\u306a\u70b9\u3005(\u30b3\u30ed\u30f3\u3001\u30d4\u30ea\u30aa\u30c9)\u306e\u610f\u5473 [1,:] [1, ..., 1]","published":"2020-10-14 23:05:30","blog_url":"https://jskangaroo.hatenablog.com/","provider_name":"Hatena Blog","blog_title":"jskangaroo\u306e\u30d6\u30ed\u30b0","author_name":"jskangaroo","height":"190","url":"https://jskangaroo.hatenablog.com/entry/2020/10/14/230530","version":"1.0","categories":["python\u30e9\u30a4\u30d6\u30e9\u30ea","python"],"image_url":null}