Skip to content

Commit 39fb153

Browse files
committed
Add method for 2-dim arrays to nestedview
1 parent 8f0b906 commit 39fb153

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/functions.jl

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@ export flatview
4949

5050
"""
5151
nestedview(A::AbstractArray{T,M+N}, M::Integer)
52+
nestedview(A::AbstractArray{T,2})
5253
5354
AbstractArray{<:AbstractArray{T,M},N}
5455
@@ -61,6 +62,9 @@ export nestedview
6162
@inline nestedview(A::AbstractArray{T,L}, M::Integer) where {T,L} =
6263
ArrayOfSimilarArrays{T,M}(A)
6364

65+
@inline nestedview(A::AbstractArray{T,2}) where {T} =
66+
VectorOfSimilarVectors{T}(A)
67+
6468

6569
"""
6670
innersize(A:AbstractArray{<:AbstractArray}, [dim])

0 commit comments

Comments
 (0)