# tensorplay.functional.msort Source: https://www.tensorplay.cn/docs/generated/tensorplay.functional.msort.html ```python tensorplay.functional.msort(input: Tensor, *, out: Tensor | None) → Tensor ``` Sorts the elements of the input tensor along its first dimension in ascending order by value. > **Note** > > tensorplay.msort(t) is equivalent to tensorplay.sort(t, dim=0)[0]. See also tensorplay.sort(). 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: ``` >>> t = tensorplay.randn(3, 4) >>> t tensor([[-0.1321, 0.4370, -1.2631, -1.1289], [-2.0527, -1.1250, 0.2275, 0.3077], [-0.0881, -0.1259, -0.5495, 1.0284]]) >>> tensorplay.msort(t) tensor([[-2.0527, -1.1250, -1.2631, -1.1289], [-0.1321, -0.1259, -0.5495, 0.3077], [-0.0881, 0.4370, 0.2275, 1.0284]]) ```