Open danlooo opened 3 weeks ago
Maybe it's because DD is permuting the dims or something in the plot recipe, and something breaks ConcatatDiskArray inside other wrapper disk arrays?
Probably editing the DD heatmap implementation to show the array type and store it to a global will help debugging
So this may be the actual bug:
julia> collect(x for x in a_disk) == collect(x for x in a_ram)
false
Generators are broken on the ConCatDiskArray
when its wrapped in a YAXArray. It could be from a map
call as well as an explicit generator - I cant find exactly where its happening.
But this works:
julia> collect(x for x in parent(a_disk)) == collect(x for x in a_ram)
true
Probably DimensionalData should collect arrays before passing them to Makie as a failsafe, but this also needs to be fixed here in DiskArrays.
This is the fix if someone wants to PR it to YAX:
Base.Generator(f, A::YAXArray) = Base.Generator(f, parent(A))
And we need the same in Rasters.jl.
Unfortunately this is going to clash with the DimensionalData.jl Generator
behavior, which in a lot of cases will return a DimArray
because of the DimUnitRange
s returned from axes
.
Plotting of a concatenated
YAXArray
returns a wrong pattern in its plot. However, everything is fine on in-memory arrays and using comparison operations (e.g.all(a .== b)
).Tested on Julia 1.10.4 with YAXArrays v0.5.10, DimensionalData v0.27.7