原文:https://docs.scipy.org/doc/numpy/reference/generated/numpy.radians.html
校对:(虚位以待)
numpy.
radians
(x[, out]) = <ufunc 'radians'>将角度从度转换为弧度。
参数: | x:array_like
out:ndarray,可选
|
---|---|
返回: | y:ndarray
|
也可以看看
deg2rad
例子
将度数组转换为弧度
>>> deg = np.arange(12.) * 30.
>>> np.radians(deg)
array([ 0. , 0.52359878, 1.04719755, 1.57079633, 2.0943951 ,
2.61799388, 3.14159265, 3.66519143, 4.1887902 , 4.71238898,
5.23598776, 5.75958653])
>>> out = np.zeros((deg.shape))
>>> ret = np.radians(deg, out)
>>> ret is out
True