Open aplavin opened 3 weeks ago
The new expand_dimension methods introduced in https://github.com/MakieOrg/Makie.jl/pull/4125, eg https://github.com/MakieOrg/Makie.jl/blob/2b5931ee92c00603a669d02b8103bff49315024b/src/interfaces.jl#L144, lead to ambiguities with expand_dimensions defined for custom array types. Ambiguities appear whenever one defines expand_dimesions(::GridBased, data::My2DArray). Presumably, this is the proper way to overload expand_dimesions for packages?
expand_dimension
expand_dimensions
expand_dimesions(::GridBased, data::My2DArray)
expand_dimesions
MWE with a KeyedArray:
julia> using Makie, AxisKeysExtra julia> heatmap(KeyedArray(rand(2,2), x=1:2, y=1:2)) ERROR: MethodError: expand_dimensions(::CellGrid, ::KeyedArray{Float64, 2, NamedDimsArray{(:x, :y), Float64, 2, Matrix{Float64}}, Tuple{UnitRange{Int64}, UnitRange{Int64}}}) is ambiguous. Candidates: expand_dimensions(ct::GridBased, x::KeyedArray{<:Any, 2}) @ MakieExt ~/.julia/packages/AxisKeysExtra/qrSGg/ext/MakieExt.jl:42 expand_dimensions(::Union{CellGrid, VertexGrid}, data::AbstractMatrix{<:Union{var"#s340", var"#s28"} where {var"#s340"<:Real, var"#s28"<:ColorTypes.Colorant}}) @ Makie ~/.julia/packages/Makie/aG6xp/src/interfaces.jl:144 Possible fix, define expand_dimensions(::Union{CellGrid, VertexGrid}, ::KeyedArray{<:Union{var"#s340", var"#s28"} where {var"#s340"<:Real, var"#s28"<:ColorTypes.Colorant}, 2})
while it worked on earlier Makie versions.
]st -m Makie
]activate --temp; add Makie
I guess the union dispatch is causing issues. Wonder if that's really needed? Will look into it.
The new
expand_dimension
methods introduced in https://github.com/MakieOrg/Makie.jl/pull/4125, eg https://github.com/MakieOrg/Makie.jl/blob/2b5931ee92c00603a669d02b8103bff49315024b/src/interfaces.jl#L144, lead to ambiguities withexpand_dimensions
defined for custom array types. Ambiguities appear whenever one definesexpand_dimesions(::GridBased, data::My2DArray)
. Presumably, this is the proper way to overloadexpand_dimesions
for packages?MWE with a KeyedArray:
while it worked on earlier Makie versions.
]st -m Makie
) 0.21.7]activate --temp; add Makie
) yes