reminisce commented on a change in pull request #15377: [numpy][doc-fix] 
zeros_like, linspace, reciprocal, square, and arcsin
URL: https://github.com/apache/incubator-mxnet/pull/15377#discussion_r298004840
 
 

 ##########
 File path: python/mxnet/_numpy_op_doc.py
 ##########
 @@ -173,3 +217,255 @@ def _np_cumsum(a, axis=None, dtype=None, out=None):
         `axis` is not None or `a` is a 1-d array.
     """
     pass
+
+
+def _np_reciprocal(x, out=None, **kwargs):
+    """
+    reciprocal(x, out=None, dtype=None)
+
+    Return the reciprocal of the argument, element-wise.
+    Calculates ``1/x``.
+
+    Parameters
+    ----------
+    x : ndarray
+    out : ndarray, None, or tuple of ndarray and None, optional
+        A location into which the result is stored. If provided, it must have 
+        a shape that the inputs broadcast to. If not provided or None, 
+        a freshly-allocated array is returned. A tuple 
+        (possible only as a keyword argument) must have length equal to 
+        the number of outputs.
+    
+    Returns
+    -------
+    y : ndarray
+        Return array.
+    
+
+    Examples
+    --------
+    >>> np.reciprocal(2.)
+    0.5
+    >>> np.reciprocal([1, 2., 3.33])
+    array([ 1.       ,  0.5      ,  0.3003003])
+
+    Notes
+    -----
+
+    .. note::
+        This function is not designed to work with integers.
+    For integer arguments with absolute value larger than 1 the result is
+    always zero because of the way Python handles integer division.  For
+    integer zero the result is an overflow.
+
+    `ctx` argument is not supported now.
+
+    This function differs to the original `numpy.reciprocal
+    
<https://docs.scipy.org/doc/numpy/reference/generated/numpy.reciprocal.html>`_ 
in
+    the following aspects:
+
+    - Only support ndarray now.
+    - `where` argument is not supported.
+    """
+    pass
+
+
+def _np_square(x, out=None, **kwargs):
+    """
+    square(x, out=None, **kwargs)
+
+    Return the element-wise square of the input.
+
+    Parameters
+    ----------
+    x : ndarray
+    out : ndarray, None, or tuple of ndarray and None, optional
+        A location into which the result is stored. If provided, it must have
+        a shape that the inputs broadcast to. If not provided or `None`,
+        a freshly-allocated array is returned. A tuple (possible only as a
+        keyword argument) must have length equal to the number of outputs.
+    
+    Returns
+    -------
+    y : ndarray
+        Return array.
+
+
+    Examples
+    --------
+    >>> np.square([-1j, 1])
 
 Review comment:
   This is not supported. Please use mxnet.numpy to run the examples.

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