Github user mengxr commented on the pull request:

    https://github.com/apache/spark/pull/3193#issuecomment-63129260
  
    For the quality of RNG, both python and numpy use Mersenne Twister 
(http://docs.scipy.org/doc/numpy/reference/generated/numpy.random.RandomState.html):
    
    > The Python stdlib module “random” also contains a Mersenne Twister 
pseudo-random number generator with a number of methods that are similar to the 
ones available in RandomState. RandomState, besides being NumPy-aware, has the 
advantage that it provides a much larger number of probability distributions to 
choose from.
    
    I can tell numpy.random uses MT19937 from its source code, and perhaps 
Python implements the same RNG. So quality-wise, there should be no issues with 
always using Python's random.
    
    But for the performance/code complexity trade-offs, maybe @JoshRosen should 
decide.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to