{"blog_title":"shikoan\u2019s memo","provider_url":"https://hatena.blog","title":"NumPy\u306e\u884c\u5217\u6f14\u7b97\u3067\u4e8c\u91cd\u30eb\u30fc\u30d7\u3092\u306a\u304f\u3059","provider_name":"Hatena Blog","html":"<iframe src=\"https://hatenablog-parts.com/embed?url=https%3A%2F%2Fkoshian2.hatenablog.jp%2Fentry%2F2018%2F04%2F03%2F020453\" title=\"NumPy\u306e\u884c\u5217\u6f14\u7b97\u3067\u4e8c\u91cd\u30eb\u30fc\u30d7\u3092\u306a\u304f\u3059 - shikoan\u2019s memo\" class=\"embed-card embed-blogcard\" scrolling=\"no\" frameborder=\"0\" style=\"display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;\"></iframe>","categories":["Numpy","Python"],"type":"rich","author_name":"shikoan","url":"https://koshian2.hatenablog.jp/entry/2018/04/03/020453","blog_url":"https://koshian2.hatenablog.jp/","width":"100%","image_url":null,"version":"1.0","description":"100 Numpy Exercises\u306e86\u756a\u3092\u898b\u3066\u77e5\u3063\u305f\u30c6\u30af\u30cb\u30c3\u30af\u3002\u3053\u308c\u306f\u6570\u5024\u30922\u9032\u6570\u8868\u8a18\u3059\u308b\u554f\u984c\u3002 86.Convert a vector of ints into a matrix binary representation (\u2605\u2605\u2605) # Author: Warren Weckesser I = np.array([0, 1, 2, 3, 15, 16, 32, 64, 128]) B = ((I.reshape(-1,1) & (2**np.arange(8))) != 0).astype(int) print(B[:,::-1]) # Author: Daniel T. McDon\u2026","height":"190","author_url":"https://blog.hatena.ne.jp/shikoan/","published":"2018-04-03 02:04:53"}