{"provider_url":"https://hatena.blog","type":"rich","width":"100%","author_name":"coffee_kabu","published":"2025-05-27 12:00:00","url":"https://coffee-guhaw.hateblo.jp/entry/2025/05/27/120000","blog_title":"Bus error\u3068Segmentation fault\u306b\u56f0\u3063\u305f\u3089\u898b\u308b\u30d6\u30ed\u30b0","blog_url":"https://coffee-guhaw.hateblo.jp/","description":"\u25a0 \u53c2\u8003 : Numpy\u3067\u7279\u5b9a\u306eindex\u4ee5\u5916\u3092\u62bd\u51fa\u3059\u308b\u65b9\u6cd5\u25a0 \u53c2\u8003 : Numpy \u3067\u7279\u5b9a\u306e\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u4ee5\u5916\u306e\u8981\u7d20\u3092\u53d6\u308a\u51fa\u3059arr\u3068\u3044\u3046ndarray\u306b\u6761\u4ef6\u3092\u639b\u3051\u3066\u3001\u6761\u4ef6\u3092\u6e80\u305f\u3059\u6210\u5206\u3092arr\u304b\u3089\u629c\u3044\u3066\u3001\u5225\u306earray\u3092\u4f5c\u6210\u3059\u308b \u4f8b\u3048\u3070\u3001arr\u306e\u4e2d\u8eab\u304cx0\u3088\u308a\u5927\u304d\u3044\u3082\u306e\u3060\u3051\u53d6\u308a\u9664\u304d\u305f\u3044\u3068\u304d\u306f\u3001index = np.ones(len(arr), dtype=bool) for i in range(len(arr)): if arr[i] > x0: index[i] = False new_arr = arr[index]\u4ed6\u306b\u3082index[i] = False\u3092index[i-5:i+5] =\u2026","image_url":"https://cdn.image.st-hatena.com/image/square/23ff597bd045490499b097f036afb3ec0665a0d5/backend=imagemagick;height=80;version=1;width=80/https%3A%2F%2Fcdn.user.blog.st-hatena.com%2Fcircle_image%2F88409737%2F1514352962196085","version":"1.0","height":"190","title":"\u3010numpy, python3\u3011array\u304b\u3089\u3042\u308b\u7bc4\u56f2\u306e\u30c7\u30fc\u30bf\u4ee5\u5916\u3092\u53d6\u308a\u51fa\u3057\u3066\u5225\u306earray\u3092\u4f5c\u308b","provider_name":"Hatena Blog","categories":["python","numpy"],"html":"<iframe src=\"https://hatenablog-parts.com/embed?url=https%3A%2F%2Fcoffee-guhaw.hateblo.jp%2Fentry%2F2025%2F05%2F27%2F120000\" title=\"\u3010numpy, python3\u3011array\u304b\u3089\u3042\u308b\u7bc4\u56f2\u306e\u30c7\u30fc\u30bf\u4ee5\u5916\u3092\u53d6\u308a\u51fa\u3057\u3066\u5225\u306earray\u3092\u4f5c\u308b - Bus error\u3068Segmentation fault\u306b\u56f0\u3063\u305f\u3089\u898b\u308b\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>","author_url":"https://blog.hatena.ne.jp/coffee_kabu/"}