gyshi commented on a change in pull request #15390: [Numpy  fix-doc]modify 
numpy doc
URL: https://github.com/apache/incubator-mxnet/pull/15390#discussion_r298543064
 
 

 ##########
 File path: python/mxnet/_numpy_op_doc.py
 ##########
 @@ -173,3 +212,73 @@ def _np_cumsum(a, axis=None, dtype=None, out=None):
         `axis` is not None or `a` is a 1-d array.
     """
     pass
+
+
+def _np_max(axis=None, keepdims=False, initial=None, out=None):
+    """
+    Return the maximum of an array or maximum along an axis.
+
+    Parameters
+    ----------
+    a : ndarray
+        Input data.
+    axis : None or int or tuple of ints, optional
+        Axis or axes along which to operate.  By default, flattened input is
+        used.
+
+        If this is a tuple of ints, the maximum is selected over multiple axes,
+        instead of a single axis or all the axes as before.
+
+    keepdims : bool, optional
+        If this is set to True, the axes which are reduced are left
+        in the result as dimensions with size one. With this option,
+        the result will broadcast correctly against the input array.
+
+        If the default value is passed, then `keepdims` will not be
+        passed through to the `amax` method of sub-classes of
+        `ndarray`, however any non-default value will be.  If the
+        sub-class' method does not implement `keepdims` any
+        exceptions will be raised.
+
+    initial :
+        Parameter initial is not supported yet, we will support it in the 
future.
+        now it must be None.
+
+    out : ndarray, optional
+        Alternative output array in which to place the result.  Must
+        be of the same shape and buffer length as the expected output.
+
+    Returns
+    -------
+    amax : ndarray or scalar
+        Maximum of `a`. If `axis` is None, the result is a scalar value.
+        If `axis` is given, the result is an array of dimension
+        ``a.ndim - 1``.
+
+    See Also
+    --------
+    amax     equivalent function
+
+    Notes
+    -----
+    - Not support axis < 0.
+
+    Examples not work:
+    >>> np.max(np.array([[-50], [10]]), axis= -1)
+    i >= 0 && i < ndim(): axis = -1 must be in range [0, 2)
+
+    Examples
+    --------
+    >>> a = np.arange(4).reshape((2,2))
+    >>> a
+    array([[0., 1.],
+          [2., 3.]])
+    >>> np.amax(a)           # Maximum of the flattened array
 
 Review comment:
   they are the same function

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


With regards,
Apache Git Services

Reply via email to