oneflow.cos¶
-
oneflow.
cos
()¶ Returns a new tensor with the cosine of the elements of
input
.\[\text{out}_{i} = \cos(\text{input}_{i})\]- Parameters
input (Tensor) – the input tensor.
For example:
>>> import oneflow as flow >>> import numpy as np >>> arr = np.array([1.4309, 1.2706, -0.8562, 0.9796]) >>> input = flow.tensor(arr, dtype=flow.float32) >>> output = flow.cos(input).numpy()