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

ubuntu - PHP script to find files of certain extensions in a directory, returns populated array when run in browser, but empty array when run from terminal -

php - How can i create a user dashboard -

javascript - How to detect toggling of the fullscreen-toolbar in jQuery Mobile? -