You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mxnet.apache.org by GitBox <gi...@apache.org> on 2018/04/05 22:20:17 UTC

[GitHub] piiswrong closed pull request #10423: Fix typos in random number docs

piiswrong closed pull request #10423: Fix typos in random number docs
URL: https://github.com/apache/incubator-mxnet/pull/10423
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git a/python/mxnet/ndarray/random.py b/python/mxnet/ndarray/random.py
index 93f97e80b47..7be854a3107 100644
--- a/python/mxnet/ndarray/random.py
+++ b/python/mxnet/ndarray/random.py
@@ -83,13 +83,12 @@ def uniform(low=0, high=1, shape=_Null, dtype=_Null, ctx=None, out=None, **kwarg
     >>> mx.nd.random.uniform(0, 1)
     [ 0.54881352]
     <NDArray 1 @cpu(0)
-    >>>> mx.nd.random.uniform(0, 1, ctx=mx.gpu(0))
+    >>> mx.nd.random.uniform(0, 1, ctx=mx.gpu(0))
     [ 0.92514056]
     <NDArray 1 @gpu(0)>
     >>> mx.nd.random.uniform(-1, 1, shape=(2,))
-    [[ 0.71589124  0.08976638]
-     [ 0.69450343 -0.15269041]]
-    <NDArray 2x2 @cpu(0)>
+    [ 0.71589124  0.08976638]
+    <NDArray 2 @cpu(0)>
     >>> low = mx.nd.array([1,2,3])
     >>> high = mx.nd.array([2,3,4])
     >>> mx.nd.random.uniform(low, high, shape=2)
@@ -134,7 +133,7 @@ def normal(loc=0, scale=1, shape=_Null, dtype=_Null, ctx=None, out=None, **kwarg
     >>> mx.nd.random.normal(0, 1)
     [ 2.21220636]
     <NDArray 1 @cpu(0)>
-    >>>> mx.nd.random.normal(0, 1, ctx=mx.gpu(0))
+    >>> mx.nd.random.normal(0, 1, ctx=mx.gpu(0))
     [ 0.29253659]
     <NDArray 1 @gpu(0)>
     >>> mx.nd.random.normal(-1, 1, shape=(2,))
@@ -200,7 +199,7 @@ def exponential(scale=1, shape=_Null, dtype=_Null, ctx=None, out=None, **kwargs)
 
     Its probability density function is
 
-        f(x; \frac{1}{\beta}) = \frac{1}{\beta} \exp(-\frac{x}{\beta}),
+    .. math:: f(x; \frac{1}{\beta}) = \frac{1}{\beta} \exp(-\frac{x}{\beta}),
 
     for x > 0 and 0 elsewhere. \beta is the scale parameter, which is the
     inverse of the rate parameter \lambda = 1/\beta.
diff --git a/python/mxnet/symbol/random.py b/python/mxnet/symbol/random.py
index 721a1daa95e..24f1c5aa49e 100644
--- a/python/mxnet/symbol/random.py
+++ b/python/mxnet/symbol/random.py
@@ -123,7 +123,7 @@ def exponential(scale=1, shape=_Null, dtype=_Null, **kwargs):
 
     Its probability density function is
 
-        f(x; \frac{1}{\beta}) = \frac{1}{\beta} \exp(-\frac{x}{\beta}),
+    .. math:: f(x; \frac{1}{\beta}) = \frac{1}{\beta} \exp(-\frac{x}{\beta}),
 
     for x > 0 and 0 elsewhere. \beta is the scale parameter, which is the
     inverse of the rate parameter \lambda = 1/\beta.


 

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


With regards,
Apache Git Services