haojin2 commented on a change in pull request #17133: [Numpy ]Modify 
np.random.shuffle to enable inplace by default
URL: https://github.com/apache/incubator-mxnet/pull/17133#discussion_r360295456
 
 

 ##########
 File path: python/mxnet/symbol/numpy/random.py
 ##########
 @@ -288,3 +288,39 @@ def choice(a, size=None, replace=True, p=None, ctx=None, 
out=None):
             return _npi.choice(a=a, size=size, replace=replace, ctx=ctx, 
weighted=False, out=out)
         else:
             return _npi.choice(p, a=a, size=size, replace=replace, ctx=ctx, 
weighted=True, out=out)
+
+
+def shuffle(x):
+    """
+    Modify a sequence in-place by shuffling its contents.
+
+    This function only shuffles the array along the first axis of a
+    multi-dimensional array. The order of sub-arrays is changed but
+    their contents remain the same.
+
+    Parameters
+    ----------
+    x: ndarray
 
 Review comment:
   `x: _Symbol`

----------------------------------------------------------------
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:
[email protected]


With regards,
Apache Git Services

Reply via email to