- 
          
 - 
                Notifications
    
You must be signed in to change notification settings  - Fork 5.7k
 
Closed
Closed
Copy link
Labels
bugIndicates an unexpected problem or unintended behaviorIndicates an unexpected problem or unintended behaviorregression 1.11Regression in the 1.11 releaseRegression in the 1.11 releasesortingPut things in orderPut things in order
Description
MWE
julia> a = reshape(6000:-1:1, 1000, :) |> collect;
julia> bad = partialsort!(view(copy(a), :, 6), 500:501)
2-element view(::Matrix{Int64}, 500:501, 6) with eltype Int64:
 546
 545
julia> good = partialsort(view(copy(a), :, 6), 500:501)
2-element view(::Vector{Int64}, 500:501) with eltype Int64:
 500
 501
julia> versioninfo()
Julia Version 1.12.0-rc2
Commit 72cbf019d0 (2025-09-06 12:00 UTC)
Build Info:
  Official https://julialang.org release
Platform Info:
  OS: Windows (x86_64-w64-mingw32)
  CPU: 16 × 12th Gen Intel(R) Core(TM) i7-12650H
  WORD_SIZE: 64
  LLVM: libLLVM-18.1.7 (ORCJIT, alderlake)
  GC: Built with stock GC
Threads: 1 default, 1 interactive, 1 GC (on 16 virtual cores)Looks like SubArrayOptimization fails to pass the offset change into the inner Algorithm.
CC @LilithHafner
Metadata
Metadata
Assignees
Labels
bugIndicates an unexpected problem or unintended behaviorIndicates an unexpected problem or unintended behaviorregression 1.11Regression in the 1.11 releaseRegression in the 1.11 releasesortingPut things in orderPut things in order