-
-
Notifications
You must be signed in to change notification settings - Fork 5.7k
Open
Labels
correctness bug ⚠Bugs that are likely to lead to incorrect results in user code without throwingBugs that are likely to lead to incorrect results in user code without throwingregressionRegression in behavior compared to a previous versionRegression in behavior compared to a previous versionupstreamThe issue is with an upstream dependency, e.g. LLVMThe issue is with an upstream dependency, e.g. LLVM
Milestone
Description
On nightly on 1.13.0-DEV.213 and 1.13.0-DEV.331 we get very broken results on applying a function via map in contrast to applying the function on all elements that go into map.
This works as expected in Julia 1.11.4
See rafaqz/DimensionalData.jl#965 for the details, but I managed to condense it to the following MWE.
Interestingly the result is correct when I add some @show statements in the _format function.
julia> using DimensionalData
julia> a = ones(5, 4)
5×4 Matrix{Float64}:
1.0 1.0 1.0 1.0
1.0 1.0 1.0 1.0
1.0 1.0 1.0 1.0
1.0 1.0 1.0 1.0
1.0 1.0 1.0 1.0
julia> di = X(LinRange(140, 148, 5)), Y(LinRange(2, 11, 4))
(↓ X LinRange{Float64}(140.0, 148.0, 5),
→ Y LinRange{Float64}(2.0, 11.0, 4))
julia> map(DimensionalData.Dimensions._format, di, axes(a))
rdim = X{DimensionalData.Dimensions.Lookups.Sampled{Float64, LinRange{Float64, Int64}, DimensionalData.Dimensions.Lookups.ForwardOrdered, DimensionalData.Dimensions.Lookups.Regular{Float64}, DimensionalData.Dimensions.Lookups.Points, DimensionalData.Dimensions.Lookups.NoMetadata}}([140.0, 142.0, 144.0, 146.0, 148.0])
rdim = Y{DimensionalData.Dimensions.Lookups.Sampled{Float64, LinRange{Float64, Int64}, DimensionalData.Dimensions.Lookups.ForwardOrdered, DimensionalData.Dimensions.Lookups.Regular{Float64}, DimensionalData.Dimensions.Lookups.Points, DimensionalData.Dimensions.Lookups.NoMetadata}}([2.0, 5.0, 8.0, 11.0])
(↓ X Sampled{Float64} LinRange{Float64}(140.0, 148.0, 5) ForwardOrdered Regular Points,
→ Y Sampled{Float64} LinRange{Float64}(6.830797958345e-310, 5.0e-324, 4096) ForwardOrdered Regular Points)
# Expected result for the second element:
julia> [DimensionalData.Dimensions._format(di[i], axes(a)[i]) for i in eachindex(di)][2]
Y Sampled{Float64} ForwardOrdered Regular DimensionalData.Dimensions.Lookups.Points
wrapping: 4-element LinRange{Float64, Int64}:
2.0, 5.0, 8.0, 11.0
Metadata
Metadata
Assignees
Labels
correctness bug ⚠Bugs that are likely to lead to incorrect results in user code without throwingBugs that are likely to lead to incorrect results in user code without throwingregressionRegression in behavior compared to a previous versionRegression in behavior compared to a previous versionupstreamThe issue is with an upstream dependency, e.g. LLVMThe issue is with an upstream dependency, e.g. LLVM