python - How to use np.random.seed() to create new matrix with fixed random value -


i want create new matrix (v) fixed random value in each position (every time run algorithm, want have same matrix showing up). possible use np.random.seed() matrix? like

v = np.zeros([20,50]) v = np.random.seed(v) 

use set seed:

np.random.seed(0) # or whatever value fancy 

and generate random data:

v = np.random.rand(your_shape) # or whatever randomness fancy randint, randn ... 

Comments

Popular posts from this blog

python - Operations inside variables -

Generic Map Parameter java -

arrays - What causes a java.lang.ArrayIndexOutOfBoundsException and how do I prevent it? -