cosh

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

Hyperbolic cosine, element-wise. Equivalent to 1/2 * (np.exp(x) + np.exp(-x)) and np.cos(1j*x).

Parameters:
x : ndarray or scalar

Input array or scalar.

out : ndarray or 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. The dtype of the output is the same as that of the input if the input is an ndarray.

Returns:
y : ndarray or scalar

The corresponding hyperbolic cosine values. This is a scalar if x is a scalar.

Notes
This function only supports input type of float.

Examples

>>> np.cosh(0)
1.0