Yucheng Huang created MXNET-1455:
------------------------------------
Summary: np.random.multinomial returns unreasonable result
Key: MXNET-1455
URL: https://issues.apache.org/jira/browse/MXNET-1455
Project: Apache MXNet
Issue Type: Bug
Reporter: Yucheng Huang
Hi,
I am new to MXNet. When I run tutorial d2l section 2.6 Probability.
%matplotlib inline
import random
from mxnet import np, npx
from d2l import mxnet as d2l
npx.set_np()
counts = np.random.multinomial(1000, fair_probs).astype(np.float32)
counts / 1000
I get:
array([0., 0., 0., 0., 0., 1.]), which I think it is unreasonable.
When I try:
import numpy
counts = numpy.random.multinomial(1000, fair_probs).astype(np.float32)
counts / 1000
I get:
array([0.159, 0.159, 0.172, 0.169, 0.172, 0.169], dtype=float32), which meets
my expectation.
I see someone reports in Github
[https://github.com/apache/incubator-mxnet/issues/15383#issuecomment-637583446]
However, this issue still exists in Windows.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]