haojin2 commented on a change in pull request #15388: Doc
URL: https://github.com/apache/incubator-mxnet/pull/15388#discussion_r299003566
 
 

 ##########
 File path: python/mxnet/symbol/numpy/_symbol.py
 ##########
 @@ -1409,6 +1421,113 @@ def _unary_func_helper(x, fn_array, fn_scalar, 
out=None, **kwargs):
 
 
 @set_module('mxnet.symbol.numpy')
+def trunc(x, out=None, **kwargs):
+    r"""
+    trunc(x, out=None)
+
+    Return the truncated value of the input, element-wise.
+
+    The truncated value of the scalar `x` is the nearest integer `i` which
+    is closer to zero than `x` is. In short, the fractional part of the
+    signed number `x` is discarded.
+    
+    Parameters
+    ----------
+    x : _Symbol or scalar
+        Input data.
+    out : _Symbol or None, optional
+        Dummy parameter to keep the consistency with the ndarray counterpart.
+    
+    Returns
+    -------
+    y : _Symbol or scalar
+        The truncated value of each element in `x`.
+        This is a scalar if `x` is a scalar.
+
+    Notes
+    -----
+    This function differs from the original numpy.trunc in the following 
aspects:
+        - Do not support `where`, a parameter in numpy which indicates where 
to calculate. 
+        - Cannot cast type automatically. Dtype of `out` must be same as the 
expected one.
+        - Cannot broadcast automatically. Shape of `out` must be same as the 
expected one.
+        - If `x` is plain python numeric, the result won't be stored in out.
+    """    
+    return _unary_func_helper(x, _npi.trunc, _np.trunc, out=out, **kwargs)
+
+
+@set_module('mxnet.symbol.numpy')
+def logical_not(x, out=None, **kwargs):
+    r"""
+    logical_not(x, out=None)
+
+    Compute the truth value of NOT x element-wise.
+
+    Parameters
+    ----------
+    x : _Symbol or scalar
+        Logical NOT is applied to the elements of `x`.
+    out : _Symbol or None, optional
+        Dummy parameter to keep the consistency with the ndarray counterpart.
+    
+    Returns
+    -------
+    y : bool or _Symbol
+        Boolean result with the same shape as `x` of the NOT operation
+        on elements of `x`.
+        This is a scalar if `x` is a scalar.
+
+    Notes
+    -----
+    This function differs from the original numpy.logical_not in the following 
aspects:
+        - Do not support `where`, a parameter in numpy which indicates where 
to calculate.
+        - Cannot cast type automatically. Dtype of `out` must be same as the 
expected one.
+        - Cannot broadcast automatically. Shape of `out` must be same as the 
expected one.
+        - If `x` is plain python numeric, the result won't be stored in out.
+    """
+    return _unary_func_helper(x, _npi.logical_not, _np.logical_not, out=out, 
**kwargs)
+
+
+@set_module('mxnet.symbol.numpy')
+def arccosh(x, out=None, **kwargs):
+    r"""
+    arccosh(x, out=None)
+
+    Inverse hyperbolic cosine, element-wise.
+
+    Parameters
+    ----------
+    x : _Symbol or scalar
+        Input array.
+    out : _Symbol or None, optional
+        Dummy parameter to keep the consistency with the ndarray counterpart.
+    
+    Returns
+    -------
+    arccosh : _Symbol
+        Array of the same shape as `x`.
+        This is a scalar if `x` is a scalar.
+
+    Notes
+    -----
+    `arccosh` is a multivalued function: for each `x` there are infinitely
+    many numbers `z` such that `cosh(z) = x`. The convention is to return the
+    `z` whose imaginary part lies in `[-pi, pi]` and the real part in
+    ``[0, inf]``.
 
 Review comment:
   Since we do not support complex numbers in any of the operators, just remove 
the parts related to complex numbers or imaginary part. Please also check for 
all other operators.

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