# Has sortrows disappeard?

**URL:** <https://discourse.julialang.org/t/has-sortrows-disappeard/53543>\
**Category:** New to Julia\
**Tags:** sort\
**Created:** [January 18, 2021, 2:56pm UTC](https://discourse.julialang.org/t/has-sortrows-disappeard/53543 "2021-01-18T14:56:54Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![mposs](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/mposs/32/21087_2.png) [@mposs](https://discourse.julialang.org/u/mposs)\
**Post date:** [January 18, 2021, 2:56pm UTC](https://discourse.julialang.org/t/has-sortrows-disappeard/53543/1 "2021-01-18T14:56:54Z")

</div>

Hi  
Apparently there use to be a function `sortrows()` in julia, that sorted the rows of matrix `A` lexicographically.  
It seems that this function has disappeared, am I wrong?

Michael.

---

<div class="post-metadata">

**Author:** ![Oscar\_Smith](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/oscar_smith/32/25343_2.png) [@Oscar\_Smith](https://discourse.julialang.org/u/Oscar_Smith)\
**Post date:** [January 18, 2021, 3:04pm UTC](https://discourse.julialang.org/t/has-sortrows-disappeard/53543/2 "2021-01-18T15:04:17Z")

</div>

you could write this as `sort(A, dims=2)`. I’m not sure if `sortrows` used to be a function.

---

<div class="post-metadata">

**Author:** ![GunnarFarneback](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/gunnarfarneback/32/1827_2.png) [@GunnarFarneback](https://discourse.julialang.org/u/GunnarFarneback)\
**Post date:** [January 18, 2021, 3:08pm UTC](https://discourse.julialang.org/t/has-sortrows-disappeard/53543/3 "2021-01-18T15:08:29Z")

</div>

Functions that have disappeared were deprecated in some version of Julia, usually 0.7. Running that version gives a helpful hint what you can do instead (not always the best solution, but a solution).

```julia
   _ _ _(_)_ | A fresh approach to technical computing
  (_) | (_) (_) | Documentation: https://docs.julialang.org
   _ _ _| |_ __ _ | Type "?" for help, "]?" for Pkg help.
  | | | | | | |/ _` | |
  | | |_| | | | (_| | | Version 0.7.0 (2018-08-08 06:46 UTC)
 _/ |\ __'_|_|_|\__'_| |  
|__/ | x86_64-linux-gnu

julia> sortrows(rand(2, 2))
┌ Warning: `sortrows(A::AbstractMatrix; kws...)` is deprecated, use `sortslices(A, dims=1, kws...)` instead.
│ caller = top-level scope at none:0
└ @ Core none:0
2×2 Array{Float64,2}:
 0.135429 0.150462
 0.391157 0.297061

```

Note, deprecations and removals don’t happen in minor Julia 1.x releases but were somewhat frequent in the 0.x times.
