mercredi 29 avril 2015

Is numpy.random.RandomState() automatically called whenever rand() is called?

Languages like C++ needs the programmer to set seed otherwise the output of random number generation is always the same. However, libraries like numpy does not need to initialize seen manually.

For example, code like:

from numpy.random import rand
rand()

gives a different result every time.

Does that mean numpy.random.RandomState(seed=None) is called every time you call rand?




Aucun commentaire:

Enregistrer un commentaire