You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mxnet.apache.org by ha...@apache.org on 2020/03/15 05:38:46 UTC

[incubator-mxnet] branch master updated: fix chisquare (#17825)

This is an automated email from the ASF dual-hosted git repository.

haoj pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-mxnet.git


The following commit(s) were added to refs/heads/master by this push:
     new d495f22  fix chisquare (#17825)
d495f22 is described below

commit d495f228eb6ef5ba144edbe160425da74e27b497
Author: Xi Wang <xi...@gmail.com>
AuthorDate: Sun Mar 15 13:38:01 2020 +0800

    fix chisquare (#17825)
---
 python/mxnet/ndarray/numpy/random.py | 2 +-
 python/mxnet/symbol/numpy/random.py  | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/python/mxnet/ndarray/numpy/random.py b/python/mxnet/ndarray/numpy/random.py
index ff1f7fd..19e846c 100644
--- a/python/mxnet/ndarray/numpy/random.py
+++ b/python/mxnet/ndarray/numpy/random.py
@@ -1003,7 +1003,7 @@ def chisquare(df, size=None, dtype=None, ctx=None):
         ctx = current_context()
     if size == ():
         size = None
-    return gamma(df/2, 1/2, size=size, dtype=dtype, ctx=ctx)
+    return gamma(df/2, 2, size=size, dtype=dtype, ctx=ctx)
 
 
 def rand(*size, **kwargs):
diff --git a/python/mxnet/symbol/numpy/random.py b/python/mxnet/symbol/numpy/random.py
index 46be069..991dfdf 100644
--- a/python/mxnet/symbol/numpy/random.py
+++ b/python/mxnet/symbol/numpy/random.py
@@ -673,7 +673,7 @@ def chisquare(df, size=None, dtype=None, ctx=None):
         ctx = current_context()
     if size == ():
         size = None
-    return gamma(df/2, 1/2, size=size, dtype=dtype, ctx=ctx)
+    return gamma(df/2, 2, size=size, dtype=dtype, ctx=ctx)
 
 
 def exponential(scale=1.0, size=None, ctx=None, out=None):