NumPy Tutorial NumPy Statistics NumPy Resources
Python Java C++ C C# PHP R SQL DS Algo InterviewQ

NumPy - sinh() function



The NumPy sinh() function is used to calculate hyperbolic sine of a value. The hyperbolic sine of x is defined as:

sinh

where e is an Euler's number.

Syntax

numpy.sinh(a, out=None)

Parameters

a Required. Specify array (array_like) containing elements, of which the hyperbolic sine is calculated.
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 hyperbolic sine of each element in a.

Example:

In the example below, numpy sinh() function is used to calculate the hyperbolic sine of each element present in array Arr.

import numpy as np

Arr = np.array([1, 2, 3, 4])

print("The hyperbolic sine of values:")
print(np.sinh(Arr))

The output of the above code will be:

The hyperbolic sine of values:
[  1.17520119   3.62686041  10.01787493  27.2899172 ]

❮ NumPy - Functions

5