latest (dev)
Copy
Latest development documentation · Updated 2026-10-15
tensorplay.functional.sign
- tensorplay.functional.sign(input, *, out=None) Tensor[source]
Returns a new tensor with the signs of the elements of
input.- Parameters:
input (Tensor) – the input tensor.
- Keyword Arguments:
out (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.])
Help improve this page
Found an error, an unclear step, or a missing example?
Was this page helpful?

