Skip to content

Commit

Permalink
Restrict to Array
Browse files Browse the repository at this point in the history
  • Loading branch information
odow committed Jan 13, 2025
1 parent 9a5a026 commit 2973c21
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/implementations/LinearAlgebra.jl
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,10 @@ similar_array_type(::Type{Array{T,N}}, ::Type{S}) where {S,T,N} = Array{S,N}
similar_array_type(::Type{BitArray{N}}, ::Type{S}) where {S,N} = Array{S,N}
similar_array_type(::Type{BitArray{N}}, ::Type{Bool}) where {N} = BitArray{N}

function similar_array_type(::Type{<:SubArray{T,N}}, ::Type{S}) where {S,T,N}
function similar_array_type(
::Type{<:SubArray{T,N,<:Array{T}}},
::Type{S},
) where {S,T,N}
return Array{S,N}
end

Expand Down

0 comments on commit 2973c21

Please sign in to comment.