We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
If there are multiple types in the array, repeated semicolon syntax does not seem to work in 1.7.3. For example,
Julia 1.7.3:
julia> [1 2;;; nothing 4] ERROR: MethodError: no method matching size(::Nothing, ::Int64) Closest candidates are: size(::Union{LinearAlgebra.QR, LinearAlgebra.QRCompactWY, LinearAlgebra.QRPivoted}, ::Integer) at ~/Apps/julia/julia-1.7/share/julia/stdlib/v1.7/LinearAlgebra/src/qr.jl:566 size(::Union{LinearAlgebra.Cholesky, LinearAlgebra.CholeskyPivoted}, ::Integer) at ~/Apps/julia/julia-1.7/share/julia/stdlib/v1.7/LinearAlgebra/src/cholesky.jl:495 size(::Union{LinearAlgebra.Hermitian{T, S}, LinearAlgebra.Symmetric{T, S}} where {T, S}, ::Any) at ~/Apps/julia/julia-1.7/share/julia/stdlib/v1.7/LinearAlgebra/src/symmetric.jl:201 ... Stacktrace: [1] _typed_hvncat_dims(#unused#::Type{Union{Nothing, Int64}}, dims::Tuple{Int64, Int64, Int64}, row_first::Bool, as::Tuple{Int64, Int64, Nothing, Int64}) @ Base ./abstractarray.jl:2328 [2] _typed_hvncat(::Type, ::Tuple{Int64, Int64, Int64}, ::Bool, ::Int64, ::Vararg{Any}) @ Base ./abstractarray.jl:2304 [3] _hvncat(::Tuple{Int64, Int64, Int64}, ::Bool, ::Int64, ::Vararg{Any}) @ Base ./abstractarray.jl:2133 [4] hvncat(::Tuple{Int64, Int64, Int64}, ::Bool, ::Int64, ::Vararg{Any}) @ Base ./abstractarray.jl:2129 [5] top-level scope @ REPL[21]:1
Julia 1.7.2:
julia> [1 2;;; nothing 4] 1×2×2 Array{Union{Nothing, Int64}, 3}: [:, :, 1] = 1 2 [:, :, 2] = nothing 4
The text was updated successfully, but these errors were encountered:
Seems like backporting #45365 will fix this.
Sorry, something went wrong.
As a workaround, you can define:
Base.size(x::Nothing, y::Int) = Base.cat_size(x, y)
Closing as there seems to be no plan for a 1.7.4 release.
No branches or pull requests
If there are multiple types in the array, repeated semicolon syntax does not seem to work in 1.7.3. For example,
Julia 1.7.3:
Julia 1.7.2:
The text was updated successfully, but these errors were encountered: