Menu
×
   ❮     
HTML CSS JAVASCRIPT SQL PYTHON JAVA PHP HOW TO W3.CSS C C++ C# BOOTSTRAP REACT MYSQL JQUERY EXCEL XML DJANGO NUMPY PANDAS NODEJS R TYPESCRIPT ANGULAR GIT POSTGRESQL MONGODB ASP AI GO KOTLIN SASS VUE DSA GEN AI SCIPY AWS CYBERSECURITY DATA SCIENCE
     ❯   

NumPy 双曲函数


双曲函数

NumPy 提供了 sinh()cosh()tanh() 这些 ufunc,它们接收以弧度表示的值,并输出相应的 sinh、cosh 和 tanh 值。

示例

查找 PI/2 的 sinh 值

import numpy as np

x = np.sinh(np.pi/2)

print(x)
自己尝试 »

示例

查找数组 arr 中所有值的 cosh 值

import numpy as np

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

x = np.cosh(arr)

print(x)
自己尝试 »

查找角度

根据双曲正弦、余弦、正切的值查找角度。例如,双曲正弦、余弦和正切的反函数(arcsinh、arccosh、arctanh)。

NumPy 提供了 arcsinh()arccosh()arctanh() 这些 ufunc,它们根据给定的 sinh、cosh 和 tanh 值输出以弧度表示的角度值。

示例

查找 1.0 的角度

import numpy as np

x = np.arcsinh(1.0)

print(x)
自己尝试 »

数组中每个值的角

示例

查找数组中所有 tanh 值的角度

import numpy as np

arr = np.array([0.1, 0.2, 0.5])

x = np.arctanh(arr)

print(x)
自己尝试 »


×

Contact Sales

If you want to use W3Schools services as an educational institution, team or enterprise, send us an e-mail:
[email protected]

Report Error

If you want to report an error, or if you want to make a suggestion, send us an e-mail:
[email protected]

W3Schools is optimized for learning and training. Examples might be simplified to improve reading and learning. Tutorials, references, and examples are constantly reviewed to avoid errors, but we cannot warrant full correctness of all content. While using W3Schools, you agree to have read and accepted our terms of use, cookie and privacy policy.

Copyright 1999-2024 by Refsnes Data. All Rights Reserved. W3Schools is Powered by W3.CSS.