Python / Numpy > Link > numpy.random と random.randomの違い > thread-safe かどうか


numpy.randomrandom.randomの違いについて
http://stackoverflow.com/questions/7029993/differences-between-numpy-random-and-random-random-in-python

thread-safeかどうか

回答の中で気になったのは以下。

answered Aug 11 '11 at 17:56
Hannele
...
For numpy.random.seed(), the main difficulty is that it is not thread-safe -
...
As far as I can tell, random.random.seed() is thread-safe (or at least, I haven't found any evidence to the contrary).

他の違い

The numpy.random library contains a few extra probability distributions commonly used in scientific research, as well as a couple of convenience functions for generating arrays of random data. The random.random library is a little more lightweight, and should be fine if you're not doing scientific research or other kinds of work in statistics.

Mersenne twister

Otherwise, they both use the Mersenne twister sequence to generate their random numbers

crypt関連

上記のリンク先においては、crypt関連の場合は。。。という表記がいくつか見つかる。
deterministic(決定論的な)方法を使っているMersenne twisterなどではcrypt関連では問題になるとのこと。

cryptは使うことはないだろう。