# tensorplay.functional.sign Source: https://www.tensorplay.cn/docs/generated/tensorplay.functional.sign.html ```python tensorplay.functional.sign(input, *, out=None) → Tensor ``` Returns a new tensor with the signs of the elements of input. $$\text{out}_{i} = \operatorname{sgn}(\text{input}_{i})$$ Parameters: input ([Tensor](/docs/generated/tensorplay.Tensor.html#tensorplay.Tensor)) – the input tensor. Keyword Arguments: out ([Tensor](/docs/generated/tensorplay.Tensor.html#tensorplay.Tensor), optional) – the output tensor. Example: ``` >>> a = tensorplay.tensor([0.7, -1.2, 0., 2.3]) >>> a tensor([ 0.7000, -1.2000, 0.0000, 2.3000]) >>> tensorplay.sign(a) tensor([ 1., -1., 0., 1.]) ```