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 2020/01/17 07:15:36 UTC

[GitHub] [incubator-mxnet] xidulu commented on a change in pull request #17302: [numpy]add op random.logistic, random.gumbel

xidulu commented on a change in pull request #17302: [numpy]add op random.logistic, random.gumbel
URL: https://github.com/apache/incubator-mxnet/pull/17302#discussion_r367796564
 
 

 ##########
 File path: python/mxnet/numpy/random.py
 ##########
 @@ -200,6 +200,192 @@ def normal(loc=0.0, scale=1.0, size=None, dtype=None, ctx=None, out=None):
     return _mx_nd_np.random.normal(loc, scale, size, dtype, ctx, out)
 
 
+def logistic(loc=0.0, scale=1.0, size=None):
+    r"""Draw samples from a logistic distribution.
+
+    Samples are drawn from a logistic distribution with specified
+    parameters, loc (location or mean, also median), and scale (>0).
+
+    Parameters
+    ----------
+    loc : float or array_like of floats, optional
+        Parameter of the distribution. Default is 0.
+    scale : float or array_like of floats, optional
+        Parameter of the distribution. Must be non-negative.
+        Default is 1.
+    size : int or tuple of ints, optional
+        Output shape.  If the given shape is, e.g., ``(m, n, k)``, then
+        ``m * n * k`` samples are drawn.  If size is ``None`` (default),
+        a single value is returned if ``loc`` and ``scale`` are both scalars.
+        Otherwise, ``np.broadcast(loc, scale).size`` samples are drawn.
+
+    Returns
+    -------
+    out : ndarray or scalar
+        Drawn samples from the parameterized logistic distribution.
+
+    See Also
+    --------
 
 Review comment:
   Remove this section.

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services