# tensorplay.functional.t Source: https://www.tensorplay.cn/docs/generated/tensorplay.functional.t.html ```python tensorplay.functional.t(input) → Tensor ``` Expects input to be <= 2-D tensor and transposes dimensions 0 and 1. 0-D and 1-D tensors are returned as is. When input is a 2-D tensor this is equivalent to transpose(input, 0, 1). Parameters: input ([Tensor](/docs/generated/tensorplay.Tensor.html#tensorplay.Tensor)) – the input tensor. Example: ``` >>> x = tensorplay.randn(()) >>> x tensor(0.1995) >>> tensorplay.t(x) tensor(0.1995) >>> x = tensorplay.randn(3) >>> x tensor([ 2.4320, -0.4608, 0.7702]) >>> tensorplay.t(x) tensor([ 2.4320, -0.4608, 0.7702]) >>> x = tensorplay.randn(2, 3) >>> x tensor([[ 0.4875, 0.9158, -0.5872], [ 0.3938, -0.6929, 0.6932]]) >>> tensorplay.t(x) tensor([[ 0.4875, 0.3938], [ 0.9158, -0.6929], [-0.5872, 0.6932]]) ``` See also tensorplay.transpose().