Skip to content
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

Method ambiguities reported by Aqua #238

Open
prbzrg opened this issue Dec 27, 2023 · 0 comments
Open

Method ambiguities reported by Aqua #238

prbzrg opened this issue Dec 27, 2023 · 0 comments

Comments

@prbzrg
Copy link

prbzrg commented Dec 27, 2023

In Julia v1.10, I used Aqua to detect method ambiguities in my package impICNF/ContinuousNormalizingFlows.jl#356 and some of its report were related to this package:

Ambiguity #67
copyto!(dest::AbstractArray, src::ComponentArrays.ComponentArray) @ ComponentArrays ~/.julia/packages/ComponentArrays/xmKpc/src/similar_convert_copy.jl:36
copyto!(dest::PermutedDimsArray{T, N}, src::AbstractArray{T, N}) where {T, N} @ Base.PermutedDimsArrays permuteddimsarray.jl:230

Possible fix, define
  copyto!(::PermutedDimsArray{T, N}, ::ComponentArrays.ComponentArray{T, N, A} where A<:AbstractArray{T, N}) where {T, N}

Ambiguity #70
copyto!(dest::AbstractArray, src::ComponentArrays.ComponentArray) @ ComponentArrays ~/.julia/packages/ComponentArrays/xmKpc/src/similar_convert_copy.jl:36
copyto!(dest::PermutedDimsArray, src::AbstractArray) @ Base.PermutedDimsArrays permuteddimsarray.jl:234

Possible fix, define
  copyto!(::PermutedDimsArray, ::ComponentArrays.ComponentArray)

Ambiguity #78
getindex(ax::ComponentArrays.CombinedAxis, i::AbstractArray) @ ComponentArrays ~/.julia/packages/ComponentArrays/xmKpc/src/axis.jl:202
getindex(r::AbstractUnitRange, s::AbstractUnitRange{T}) where T<:Integer @ Base range.jl:986

Possible fix, define
  getindex(::ComponentArrays.CombinedAxis, ::AbstractUnitRange{T}) where T<:Integer

Ambiguity #79
getindex(ax::ComponentArrays.CombinedAxis, i::AbstractArray) @ ComponentArrays ~/.julia/packages/ComponentArrays/xmKpc/src/axis.jl:202
getindex(r::AbstractUnitRange, s::StepRange{T}) where T<:Integer @ Base range.jl:1007

Possible fix, define
  getindex(::ComponentArrays.CombinedAxis, ::StepRange{T}) where T<:Integer

Ambiguity #89
maybeview(x::ComponentArrays.ComponentArray, idx...) @ ComponentArrays ~/.julia/packages/ComponentArrays/xmKpc/src/array_interface.jl:116
maybeview(A::AbstractArray, args::Union{Number, Base.AbstractCartesianIndex}...) @ Base views.jl:149

Possible fix, define
  maybeview(::ComponentArrays.ComponentArray, ::Vararg{Union{Number, Base.AbstractCartesianIndex}})

Ambiguity #106
stride(x::ComponentArrays.ComponentArray, k) @ ComponentArrays ~/.julia/packages/ComponentArrays/xmKpc/src/array_interface.jl:147
stride(A::AbstractArray, k::Integer) @ Base abstractarray.jl:591

Possible fix, define
  stride(::ComponentArrays.ComponentArray, ::Integer)

Ambiguity #107
stride(x::ComponentArrays.ComponentArray, k) @ ComponentArrays ~/.julia/packages/ComponentArrays/xmKpc/src/array_interface.jl:147
stride(A::Union{Base.ReinterpretArray{T, N, S, A, IsReshaped} where {T, N, A<:Union{SubArray{T, N, A, I, true} where {T, N, A<:DenseArray, I<:Union{Tuple{Vararg{Real}}, Tuple{AbstractUnitRange, Vararg{Any}}}}, DenseArray}, IsReshaped, S}, Base.ReshapedArray{T, N, A} where {T, N, A<:Union{Base.ReinterpretArray{T, N, S, A, IsReshaped} where {T, N, A<:Union{SubArray{T, N, A, I, true} where {T, N, A<:DenseArray, I<:Union{Tuple{Vararg{Real}}, Tuple{AbstractUnitRange, Vararg{Any}}}}, DenseArray}, IsReshaped, S}, SubArray{T, N, A, I, true} where {T, N, A<:DenseArray, I<:Union{Tuple{Vararg{Real}}, Tuple{AbstractUnitRange, Vararg{Any}}}}, DenseArray}}, DenseArray}, k::Integer) @ Base reinterpretarray.jl:174

Possible fix, define
  stride(::ComponentArrays.ComponentArray, ::Integer)

Ambiguity #109
to_indices(x::ComponentArrays.ComponentArray, i::Tuple{Vararg{Union{Integer, CartesianIndex}, N}}) where N @ ComponentArrays ~/.julia/packages/ComponentArrays/xmKpc/src/array_interface.jl:88
to_indices(A, I::Tuple{}) @ Base indices.jl:348

Possible fix, define
  to_indices(::ComponentArrays.ComponentArray, ::Tuple{})

Ambiguity #110
to_indices(x::ComponentArrays.ComponentArray, i::Tuple{Any}) @ ComponentArrays ~/.julia/packages/ComponentArrays/xmKpc/src/array_interface.jl:87
to_indices(A, I::Tuple{Vararg{Integer}}) @ Base indices.jl:350

Possible fix, define
  to_indices(::ComponentArrays.ComponentArray, ::Tuple{Integer})

Ambiguity #111
to_indices(x::ComponentArrays.ComponentArray, i::Tuple{Vararg{Union{Integer, CartesianIndex}, N}}) where N @ ComponentArrays ~/.julia/packages/ComponentArrays/xmKpc/src/array_interface.jl:88
to_indices(A, I::Tuple{Vararg{Integer}}) @ Base indices.jl:350

Possible fix, define
  to_indices(::ComponentArrays.ComponentArray, ::Tuple{Vararg{Integer, N}}) where N

Ambiguity #112
to_indices(x::ComponentArrays.ComponentArray, i::Tuple{Vararg{Int64, N}}) where N @ ComponentArrays ~/.julia/packages/ComponentArrays/xmKpc/src/array_interface.jl:89
to_indices(A, I::Tuple{}) @ Base indices.jl:348

Possible fix, define
  to_indices(::ComponentArrays.ComponentArray, ::Tuple{})

Ambiguity #115
vcat(x::ComponentArrays.ComponentVector, args...) @ ComponentArrays ~/.julia/packages/ComponentArrays/xmKpc/src/array_interface.jl:61
vcat(A::Union{Number, AbstractArray}...) @ Base abstractarray.jl:1999

Possible fix, define
  vcat(::ComponentArrays.ComponentVector, ::Vararg{Union{Number, AbstractArray}})

Ambiguity #116
vcat(x::ComponentArrays.ComponentVector, args...) @ ComponentArrays ~/.julia/packages/ComponentArrays/xmKpc/src/array_interface.jl:61
vcat(A::AbstractArray, B::AbstractArray) @ Base abstractarray.jl:1997

Possible fix, define
  vcat(::ComponentArrays.ComponentVector, ::AbstractArray)

Ambiguity #117
vcat(x::ComponentArrays.ComponentVector, args...) @ ComponentArrays ~/.julia/packages/ComponentArrays/xmKpc/src/array_interface.jl:61
vcat(A::AbstractArray...) @ Base abstractarray.jl:1998

Possible fix, define
  vcat(::ComponentArrays.ComponentVector, ::Vararg{AbstractArray})

I would appreciate your attention to this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant