numpy deg2rad()方法示例

此功能用于将角度从度转换为弧度。

句法

numpy.deg2rad(array, out)

参数

  1. 数组:这些是要计算其度数值的角度。
  2. Out:这是输出数组的形状。

返回

它返回一个数组, 该数组包含与输入数组中给定的弧度相等的度角。

例子

import numpy as np 
import math

arr = [0, math.pi/2, math.pi/4, math.pi/6 ] 
print ("Input array : \n", arr) 

radval = np.deg2rad(arr) 
print ("\n Radian value : \n", radval)

输出

Input array : 
 [0, 1.5707963267948966, 0.7853981633974483, 0.5235987755982988]

 Radian value : 
 [0.         0.02741557 0.01370778 0.00913852]

来源:

https://www.srcmini02.com/30805.html

微信公众号
手机浏览(小程序)

Warning: get_headers(): SSL operation failed with code 1. OpenSSL Error messages: error:14090086:SSL routines:ssl3_get_server_certificate:certificate verify failed in /mydata/web/wwwshanhubei/web/wp-content/themes/shanhuke/single.php on line 57

Warning: get_headers(): Failed to enable crypto in /mydata/web/wwwshanhubei/web/wp-content/themes/shanhuke/single.php on line 57

Warning: get_headers(https://static.shanhubei.com/qrcode/qrcode_viewid_35714.jpg): failed to open stream: operation failed in /mydata/web/wwwshanhubei/web/wp-content/themes/shanhuke/single.php on line 57
0
分享到:
没有账号? 忘记密码?