{"provider_url":"https://hatena.blog","html":"<iframe src=\"https://hatenablog-parts.com/embed?url=https%3A%2F%2Fcoffee-guhaw.hateblo.jp%2Fentry%2F2025%2F05%2F02%2F120000\" title=\"\u3010python3\u3011\u30c7\u30fc\u30bf\u304cy=0\u3068\u4ea4\u5dee\u3059\u308b\u70b9\u3092\u691c\u51fa\u3059\u308b(zero-cross detection) - 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_name":"coffee_kabu","version":"1.0","categories":["python","numpy"],"provider_name":"Hatena Blog","published":"2025-05-02 12:00:00","blog_url":"https://coffee-guhaw.hateblo.jp/","author_url":"https://blog.hatena.ne.jp/coffee_kabu/","url":"https://coffee-guhaw.hateblo.jp/entry/2025/05/02/120000","height":"190","blog_title":"Bus error\u3068Segmentation fault\u306b\u56f0\u3063\u305f\u3089\u898b\u308b\u30d6\u30ed\u30b0","type":"rich","width":"100%","description":"sin\u6ce2\u306e\u4f4d\u76f8\u3068\u632f\u5e45\u3092\u8abf\u3079\u308b\u5fc5\u8981\u304c\u3042\u3063\u305f \u632f\u5e45\u306fsin\u6ce2\u306emax\u3092\u8abf\u3079\u308c\u3070\u3044\u3044 \u2192np.argmax\u3092\u4f7f\u3048\u3070OK\u4f4d\u76f8\u306fzero cross\u3059\u308b\u6642\u523b\u304b\u3089\u5272\u308a\u51fa\u305b\u3070\u3088\u3044\u306e\u304b\u306a\uff1f\u3068\u601d\u3063\u305f \u3072\u3068\u307e\u305a\u3001zero cross\u3059\u308bindex\u3092\u5272\u308a\u51fa\u3059\u65b9\u6cd5\u3092\u8abf\u3079\u3066\u307f\u305f\u25a0 \u53c2\u8003 : Efficiently detect sign-changes in python\u3053\u3053\u306b\u8272\u3005\u3068\u307e\u3068\u307e\u3063\u3066\u305f\u3068\u308a\u3042\u3048\u305a\u30e1\u30e2\u3060\u3051\u3057\u3066\u304a\u304fimport numpy as np a = np.array([0, -2, -1, 0, 1, 2, 0]) zero_crossings = np.where(np.diff(np.signbit\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","title":"\u3010python3\u3011\u30c7\u30fc\u30bf\u304cy=0\u3068\u4ea4\u5dee\u3059\u308b\u70b9\u3092\u691c\u51fa\u3059\u308b(zero-cross detection)"}