mindspore.ops.Tan
- class mindspore.ops.Tan[source]
Computes tangent of input element-wise.
Refer to
mindspore.ops.tan()
for more details.- Inputs:
input (Tensor) - Input tensor of any dimension.
- Outputs:
Tensor, has the same shape as input.
- Supported Platforms:
Ascend
GPU
CPU
Examples
>>> import mindspore >>> import numpy as np >>> from mindspore import Tensor, ops >>> 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]