Python numpy.tanh()
numpy.tanh()是一个数学函数,可以帮助用户计算所有x(即数组元素)的双曲正切。
相当于np.sinh(x) / np.cosh(x) 或 -1j * np.tan(1j*x) .
语法 : numpy.tanh(x[, out]) = ufunc ‘tanh’)
参数 :
array :[array_like]元素的单位是弧度。
2pi 弧度=36o度
返回 :一个对所有x具有双曲正切的数组,即数组元素
**代码 #1 : **
输出 :
代码#2:图形化表示
输出 :