BandedMatrices.jl icon indicating copy to clipboard operation
BandedMatrices.jl copied to clipboard

Is the type parameter `<:` intentional?

Open jishnub opened this issue 3 years ago • 1 comments

https://github.com/JuliaLinearAlgebra/BandedMatrices.jl/blob/9a573b1d93ee6d3b229db7d00ef1bd8818539e42/src/banded/BandedMatrix.jl#L84-L87

And https://github.com/JuliaLinearAlgebra/BandedMatrices.jl/blob/9a573b1d93ee6d3b229db7d00ef1bd8818539e42/src/banded/BandedMatrix.jl#L106-L110

Or is this supposed to be <:Any?

julia> B = BandedMatrix{<:,Matrix{<:},Base.OneTo{Int}}
BandedMatrix{<:, Matrix{<:}, Base.OneTo{Int64}}

julia> Base.isconcretetype(B)
true

julia> eltype(B)
<: (built-in function)

Is this for a banded matrix of the subtype function?

jishnub avatar Feb 02 '23 13:02 jishnub

It's 5 year old code by an RSE who was a Julia beginner so I think it is meant to be <: Any....

dlfivefifty avatar Feb 02 '23 20:02 dlfivefifty