mxnet.np.arctanh

arctanh(x, out=None, **kwargs)

Inverse hyperbolic tangent, element-wise.

>>>np.atanh is np.arctanh True

Parameters
  • x (ndarray or scalar) – Input array.

  • out (ndarray or None, optional) – A location into which the result is stored.

Returns

  • atanh (ndarray) – Array of the same shape as x. This is a scalar if x is a scalar.

  • .. note::atanh is a alias for arctanh. It is a standard API in https://data-apis.org/array-api/latest/API_specification/generated/signatures.elementwise_functions.atanh.html instead of an official NumPy operator.

    atanh is a multivalued function: for each x there are infinitely many numbers z such that tanh(z) = x.

    For real-valued input data types, atanh always returns real output. For each value that cannot be expressed as a real number or infinity, it yields nan and sets the invalid floating point error flag.

    This function differs from the original numpy.arctanh in the following aspects:

    • Do not support where, a parameter in numpy which indicates where to calculate.

    • Do not support complex-valued input.

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

Examples

>>> a = np.array([0.0, -0.5])
>>> np.atanh(a)
array([0., -0.54930615])
>>> np.atanh(1)
0.0