mindspore.ops.deg2rad
- mindspore.ops.deg2rad(x)[source]
Convert angles from degrees to radians element-wise.
- Parameters
x (Tensor) – The input tensor.
- Returns
Tensor
- Supported Platforms:
Ascend
GPU
CPU
Examples
>>> import mindspore >>> input = mindspore.tensor([[90.0, -90.0], [180.0, -180.0], [270.0, -270.0]]) >>> output = mindspore.ops.deg2rad(input) >>> print(output) [[ 1.5707964 -1.5707964] [ 3.1415927 -3.1415927] [ 4.712389 -4.712389 ]]