I am generating a random number drawn from U(0,1) using the following Scala code:
scala.util.Random(seed).nextDouble()
, where seed
is an integer.
Is there a way to generate the same random number based on the same seed in Python? I've tried using numpy and pyspark implementations, but still am not generating the exact same random number as the Scala code.