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 2019/12/30 19:34:30 UTC

[GitHub] [incubator-mxnet] reminisce commented on a change in pull request #17192: [numpy] add op flipud, fliplr

reminisce commented on a change in pull request #17192: [numpy] add op flipud, fliplr
URL: https://github.com/apache/incubator-mxnet/pull/17192#discussion_r362074110
 
 

 ##########
 File path: python/mxnet/ndarray/numpy/_op.py
 ##########
 @@ -4741,6 +4742,120 @@ def flip(m, axis=None, out=None):
         raise TypeError('type {} not supported'.format(str(type(m))))
 
 
+@set_module('mxnet.ndarray.numpy')
+def flipud(m):
+    r"""
+    flipud(*args, **kwargs)
+
+    Flip array in the up/down direction.
+
+    Flip the entries in each column in the up/down direction.
+    Rows are preserved, but appear in a different order than before.
+
+    Parameters
+    ----------
+    m : array_like
+        Input array.
+
+    Returns
+    -------
+    out : array_like
+        A view of `m` with the rows reversed.  Since a view is
+        returned, this operation is :math:`\mathcal O(1)`.
+
+    See Also
+    --------
+    fliplr : Flip array in the left/right direction.
+    rot90 : Rotate array counterclockwise.
+
+    Notes
+    -----
+    Equivalent to ``m[::-1,...]``.
+    Does not require the array to be two-dimensional.
+
+    Examples
+    --------
+    >>> A = np.diag(np.array([1.0, 2, 3]))
+    >>> A
+    array([[1.,  0.,  0.],
+        [0.,  2.,  0.],
 
 Review comment:
   Alignment. Same for the other places.
   ```
   array([[1.,  0.,  0.],
          [0.,  2.,  0.],
   ```

----------------------------------------------------------------
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