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/07/01 04:00:45 UTC

[GitHub] [incubator-mxnet] endvroy commented on a change in pull request #15382: [numpy][doc-fix] sum, copy, tile, argmax, sign, log, degrees

endvroy commented on a change in pull request #15382: [numpy][doc-fix] sum, copy, tile, argmax, sign, log, degrees
URL: https://github.com/apache/incubator-mxnet/pull/15382#discussion_r298874792
 
 

 ##########
 File path: python/mxnet/_numpy_op_doc.py
 ##########
 @@ -223,3 +224,144 @@ def _np_dot(a, b, out=None):
     array(29884.)
     """
     pass
+
+
+# def _np_sum(a, axis=None, dtype=None, out=None, keepdims=_Null):
+def _np_sum(a, axis=None, dtype=None, out=None):
+    r"""
+    sum(a, axis=_Null, dtype=_Null, keepdims=_Null, initial=_Null, out=None)
+
+    Sum of array elements over a given axis.
+
+    Parameters
+    ----------
+    a : ndarray
+        Input data.
+    axis : None or int, optional
+        Axis or axes along which a sum is performed.  The default,
+        axis=None, will sum all of the elements of the input array.  If
+        axis is negative it counts from the last to the first axis.
+    dtype : dtype, optional
+        The type of the returned array and of the accumulator in which the
+        elements are summed. The default type is float32.
+    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 `sum` method of sub-classes of
+        `ndarray`, however any non-default value will be.  If the
+        sub-classes `sum` method does not implement `keepdims` any
+        exceptions will be raised.
+    initial: Currently only supports None as input, optional
+        Starting value for the sum.
+        Currently not implemented. Please pass in None if needed.
 
 Review comment:
   Maybe wrap `None` with backticks or something? Mixing code snippets and natural language tends to be messy.

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