Difference between np.random.seed() and np.random.RandomState()

前端 未结 4 1513
野的像风
野的像风 2020-11-30 17:58

I know that to seed the randomness of numpy.random, and be able to reproduce it, I should us:

import numpy as np
np.random.seed(1234)

but w

4条回答
  •  死守一世寂寞
    2020-11-30 19:01

    np.random.RandomState() - a class that provides several methods based on different probability distributions.
    np.random.RandomState.seed() - called when RandomState() is initialised.

提交回复
热议问题