mindspore.ops.Tan
- class mindspore.ops.Tan[source]
Computes tangent of x element-wise.
Refer to
mindspore.ops.tan()
for more details.- Inputs:
x (Tensor) - Input tensor of any dimension.
- Outputs:
Tensor, has the same shape as x.
- Supported Platforms:
Ascend
GPU
CPU
Examples
>>> tan = ops.Tan() >>> x = Tensor(np.array([-1.0, 0.0, 1.0]), mindspore.float32) >>> output = tan(x) >>> print(output) [-1.5574081 0. 1.5574081]