NumPy - arccosh() function
The NumPy arccosh() function is used to calculate inverse hyperbolic cosine of a value. The inverse hyperbolic cosine of x is defined as:
Syntax
numpy.arccosh(a, out=None)
Parameters
a |
Required. Specify array (array_like) containing elements, of which the inverse hyperbolic cosine is calculated. Absolute value of element of the array should be greater than equal to 1. |
out |
Optional. Specify 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. |
Return Value
Returns the inverse hyperbolic cosine of each element in a.
Example:
In the example below, numpy arccosh() function is used to calculate the inverse hyperbolic cosine of each element present in array Arr.
import numpy as np Arr = np.array([1, 2, 3, 4]) print("The inverse hyperbolic cosine of values:") print(np.arccosh(Arr))
The output of the above code will be:
The inverse hyperbolic cosine of values: [ 0. 1.3169579 1.76274717 2.06343707]
❮ NumPy - Functions