diff --git a/src/lib/array.jl b/src/lib/array.jl index 695039f3e..b152d06d6 100644 --- a/src/lib/array.jl +++ b/src/lib/array.jl @@ -171,6 +171,7 @@ _reverse(x::Symmetric) = Symmetric(_reverse(x.data), x.uplo == 'U' ? :L : :U) _tryaxes(x) = axes(x) _tryaxes(x::Tuple) = Val(length(x)) _tryaxes(::Number) = Val(-1) +_restore(dx::AbstractArray{Nothing}, ax::Tuple) = similar(dx, ax) _restore(dx, ax::Tuple) = axes(dx) == ax ? dx : reshape(vcat(dx, falses(prod(map(length, ax)) - length(dx))), ax) _restore(dx, ::Val{N}) where {N} = ntuple(i -> get(dx,i,nothing), N) _restore(dx, ::Val{-1}) = only(dx)