About 62,300 results
Open links in new tab
  1. What does `random.seed()` do in Python? - Stack Overflow

    random.seed(a, version) in python is used to initialize the pseudo-random number generator (PRNG). PRNG is algorithm that generates sequence of numbers approximating the properties of random …

  2. python - What does numpy.random.seed (0) do? - Stack Overflow

    Jun 20, 2022 · As noted, numpy.random.seed (0) sets the random seed to 0, so the pseudo random numbers you get from random will start from the same point. This can be good for debuging in some …

  3. set random seed programwide in python - Stack Overflow

    The main python module that is run should import random and call random.seed(n) - this is shared between all other imports of random as long as somewhere else doesn't reset the seed.

  4. python - What is suggested seed value to use with random.seed ...

    Nov 9, 2009 · Simple enough question: I'm using python random module to generate random integers. I want to know what is the suggested value to use with the random.seed () function?

  5. python - How to query seed used by random.random ... - Stack Overflow

    Python random isn't cryptographically secure anyway. In what situation would python random be secure enough, but changing seed based on randomized value from last seed isn't.

  6. python - How to set the fixed random seed in numpy? - Stack Overflow

    Oct 24, 2019 · I was believing that setting a seed always gives the same result. But I got different result each times.How to set the seed so that we get the same result each time? Here is the MWE: import …

  7. Como usar random.seed() em Python? - Stack Overflow em Português

    Mar 30, 2019 · Preciso gerar um número aleatório utilizando a linguagem Python, na documentação vi que existe uma função random.seed() para aumentar a aleatoriedade do número gerado, mas achei …

  8. Python random sequence with seed - Stack Overflow

    Dec 7, 2023 · 23 I'm doing this for a school project (so I can't use any advanced features) and I'm using Python 2.6.6. I have a list of numbers from 1 to 1000 and a seed (448 for example). How can I …

  9. How To Set Global Random Seed in Python - Stack Overflow

    Apr 25, 2019 · Manually resetting the random seed in each function to the the desired seed setting variable which is imported as global with global global_seed, or imported as a parameter input to the …

  10. python - How can I retrieve the current seed of NumPy's random …

    Aug 24, 2015 · import numpy as np np.random.seed(42) However, I'm not interested in setting the seed but more in reading it. random.get_state() does not seem to contain the seed. The documentation …