Write a NumPy program to calculate hyperbolic sine, hyperbolic cosine, and hyperbolic tangent for all elements in a given array

  • برمجة بايثون

Write a NumPy program to calculate hyperbolic sine, hyperbolic cosine, and hyperbolic tangent for all elements in a given array.

Sample Input: Input: Input: [-1., 0, 1.]

الأجوبة

import numpy as np
x = np.array([-1., 0, 1.])
print(np.sinh(x))
print(np.cosh(x))
print(np.tanh(x))

Sample Output:

[-1.17520119  0.          1.17520119]
[1.54308063 1.         1.54308063]
[-0.76159416  0.          0.76159416]
هل كان المحتوى مفيد؟

تبحث عن مدرس اونلاين؟

محتاج مساعدة باختيار المدرس الافضل؟ تواصل مع فريقنا الان لمساعدتك بتأمين افضل مدرس
ماهو التخصص الذي تبحث عنه؟
اكتب هنا...