hzfan opened a new issue #15383: [numpy] np.random.multinomial return 
URL: https://github.com/apache/incubator-mxnet/issues/15383
 
 
   ## Description
   np.random.multinomial produces result significantly different from 
_np.random.multinomial
   
   ## Environment info
   python 3.7.3
   
   ## Minimum reproducible example
   
   ```
   from mxnet import np, npx
   import numpy as _np
   import random
   
   npx.set_np()
   p = [1 / 6.] * 6
   random.seed(0)
   x = _np.random.multinomial(20, p)
   for i in range(1000):
     x = x + _np.random.multinomial(20, p)
   print(x)
   
   random.seed(0)
   x = np.random.multinomial(20, p)
   for i in range(1000):
     x = x + np.random.multinomial(20, p)
   print(x)
   ```
   
   The result is
   `[3311 3297 3293 3416 3332 3371]
     [ 1337  1287  1352  1338  1364 13342]`
   
   Thank @stu1130 @reminisce for kind help.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to