You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@mxnet.apache.org by "Yucheng Huang (Jira)" <ji...@apache.org> on 2021/04/23 06:38:00 UTC
[jira] [Created] (MXNET-1455) np.random.multinomial returns
unreasonable result
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: issues-unsubscribe@mxnet.apache.org
For additional commands, e-mail: issues-help@mxnet.apache.org