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/02 04:45:17 UTC

[GitHub] [incubator-mxnet] hgt312 commented on a change in pull request #15387: Add docs for 7 ops

hgt312 commented on a change in pull request #15387: Add docs for 7 ops
URL: https://github.com/apache/incubator-mxnet/pull/15387#discussion_r299300689
 
 

 ##########
 File path: python/mxnet/ndarray/numpy/_op.py
 ##########
 @@ -882,3 +902,123 @@ def sqrt(x, out=None, **kwargs):
     This function only supports input type of float.
     """
     return _unary_func_helper(x, _npi.sqrt, _np.sqrt, out=out, **kwargs)
+
+@set_module('mxnet.ndarray.numpy')
+def arctanh(x, out=None, where=True, **kwargs):
+    r"""
+    arctanh(x, out=None, where=True)
+
+    Inverse hyperbolic tangent element-wise.
+
+    Parameters:	
+
+    -----------
+    x : ndarray 
+        Input array.
+    out : ndarray, None.
+          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.
+    where : ndarray, optional
+            Values of True indicate to calculate the ufunc at that position, 
+            values of False indicate to leave the value in the output alone.
+    Returns:	
+    --------
+    out : ndarray or scalar
+          ndarray of the same shape as x. This is a scalar if x is a scalar.
+    Examples
+
+    >>> np.arctan(0.7)
+    0.8673005276940531
+    """
+
+    return _unary_func_helper(x, _npi.arctanh, _np.arctanh, out=out, **kwargs)
+
+@set_module('mxnet.ndarray.numpy')
+def tan(x, out=None, where=True, **kwargs):
+    r"""
+    tan(x, out=None, where=True, **kwargs)
+
+    Compute tangent element-wise.
+    Equivalent to np.sin(x)/np.cos(x) element-wise.
+    
+    Parameters:	
+    ----------
+    x : array_like
+        Input array.
+    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.
+    where : ndarray, optional
+            Values of True indicate to calculate the ufunc at that position, 
+            values of False indicate to leave the value in the output alone.
+
+    Returns:	
+    -------
+    y : ndarray
+    The corresponding tangent values. This is a scalar if x is a scalar.
+
+    Examples:
+
+    >>> np.tan(0.5)
+    0.5463024898437905 
+    """
+
+    return _unary_func_helper(x, _npi.tan, _np.tan, out=out, **kwargs)
+
+@set_module('mxnet.ndarray.numpy')
+def fix(x, out=None):
+    r"""
+    Round an array of floats element-wise to nearest integer towards zero. 
+    The rounded values are returned as floats.
+    
 
 Review comment:
   remove whitespaces

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