python-numpy-hyperbolic-functions

Introduction to Python Numpy Hyperbolic Functions

In This Article, You Will Learn About Python Numpy Hyperbolic Functions.

Python Numpy Hyperbolic Functions – Before moving ahead, let’s know a bit of Python Numpy Trigonometric Functions

Contents

Hyperbolic Functions

NumPy includes the ufuncs sinh(), cosh() and tanh() that take values in radians and return the sinh cosh, tanh, and values.

Example – Finding cosh value at Pi/1.

				
					import numpy as np

x = np.cosh(np.pi/1)

print(x)

				
			
Output - 

11.591953275521519

As a result, it returned cosh value at pi/1.

Example – Finding cosh value in given array.

				
					import numpy as np

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

x = np.cosh(array)

print(x)

				
			
Output - 

[11.59195328 2.50917848 1.60028686 1.32460909]

As has been noted, it returned cosh values of the given array.

Finding Angles

Numpy provides unfunc arcsinh(), arccosh() and arctanh() that returns the radians value of inverse of sinh, cosh, tanh.

Finding angles from hyperbolic values – sine, cos, tan. E.g. sinh, cosh and tanh inverse values of Numpy ufuncs arcsinh, arccosh, arctanh.

Example – Finding radians value of the inverse of cosh at 1.0.

				
					import numpy as np

x = np.arccosh(1.0)

print(x)

				
			
Output - 

0.0

As can be seen, it returned the radians value of the inverse of cosh at 1.0.

Example – Finding radians value of the inverse of sinh at 1.0.

				
					import numpy as np

x = np.arcsinh(1.0)

print(x)

				
			
Output -

0.881373587019543

As a result, it returned the radians value of the inverse of sinh at 1.0. 

Example – Finding radians value of the inverse of tanh at 0.2.

				
					import numpy as np

x = np.arctanh(0.2)

print(x)

				
			
python-numpy-hyperbolic-functions

As shown above, it returned the radians value of the inverse of tanh at 0.2.

If you find anything incorrect in the above-discussed topic and have any further questions, please comment below.

Recent Post

Popular Post

Top Articles

Archives
Categories

Share on