{"author_name":"inamori","type":"rich","description":"\u30a8\u30e9\u30c8\u30b9\u30c6\u30cd\u30b9\u306e\u3088\u3046\u306a\u30ea\u30b9\u30c8\u3092\u4f7f\u3046\u8a08\u7b97\u306fPython\u3067\u306f\u975e\u5e38\u306b\u9045\u3044\u3067\u3059\u304c\u3001Numpy\u3092\u4f7f\u3046\u3068\u901f\u304f\u306a\u308a\u307e\u3059\u3002http://stackoverflow.com/questions/2068372/fastest-way-to-list-all-primes-below-n-in-python\u306b\u66f8\u304b\u308c\u3066\u3042\u308bprimesfrom2to\u3068\u3044\u3046\u95a2\u6570\u3067\u3059\u3002 import numpy def primesfrom2to(n): \"\"\" Input n>=6, Returns a array of primes, 2 <= p < n \"\"\" sieve = numpy.ones(n/3 + (n%6==2),\u2026","categories":["Python"],"published":"2012-07-21 00:00:00","html":"<iframe src=\"https://hatenablog-parts.com/embed?url=https%3A%2F%2Finamori.hateblo.jp%2Fentry%2F20120721%2Fp1\" title=\"NumPy\u3067\u30a8\u30e9\u30c8\u30b9\u30c6\u30cd\u30b9\u306e\u3075\u308b\u3044\u3092\u5b8c\u5168\u7406\u89e3\u3059\u308b - inamori\u2019s diary\" class=\"embed-card embed-blogcard\" scrolling=\"no\" frameborder=\"0\" style=\"display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;\"></iframe>","url":"https://inamori.hateblo.jp/entry/20120721/p1","version":"1.0","height":"190","width":"100%","provider_url":"https://hatena.blog","blog_title":"inamori\u2019s diary","image_url":null,"title":"NumPy\u3067\u30a8\u30e9\u30c8\u30b9\u30c6\u30cd\u30b9\u306e\u3075\u308b\u3044\u3092\u5b8c\u5168\u7406\u89e3\u3059\u308b","author_url":"https://blog.hatena.ne.jp/inamori/","provider_name":"Hatena Blog","blog_url":"https://inamori.hateblo.jp/"}