-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Mixed Type promotion in a Vector regression on nightly #44821
Comments
This is a variant of #44586. The fix is to use a tuple instead of a vector. |
Thanks for the reference! But the fix is only a workaround, right? In this case, by converting to a Matrix, the in between disk array, normally only lazy loaded, is unintentionally materialized. There are probably other packages with useful in between types that will be impacted by this breaking change. |
I'm not sure I understand; my suggestion was just to change |
Sorry for the confusion, the tuple does indeed work and won't affect laziness. My point was about the apparent design decision about this promotion of types, the one that led you to close your referenced issue, that seems like a unintentionally breaking change. |
The [] syntax means vcat promotion. Always has. Seen the linked issues above for other syntax which mean something else (such as T[]). |
Quoting @vtjnash here from #44096 for visbility
(emphasis mine to indicate the common type is not stable) So we either need to explicitly define the type we want in using |
On all recent nightlies ArchGDAL (see yeesian/ArchGDAL.jl#285) started failing.
On Julia 1.8 and below the following
[a::ArchGDAL.RasterBand{UInt8}, b::ArchGDAL.IRasterBand{UInt8}]
will promote to aVector{ArchGDAL.AbstractRasterBand{UInt8}}
(note theI
, the types differ).The type hierarchy is
(I)RasterBand <: ArchGDAL.AbstractRasterBand <: AbstractDiskArray{T,2} <: AbstractArray{T,N}
.On Julia 1.9 however the same is promoted all the way up the hierarchy to a
Vector{Matrix{UInt8}}
.The text was updated successfully, but these errors were encountered: