Update src/sorting.f90

By supplying the dim to minloc it will return a scalar, not a length one vector.  This saves the time of allocating to a vector and pulling from it.