Skip to content

Commit 6409bb6

Browse files
authored
Copy in sub_materialize (#219)
This should resolve JuliaArrays/BlockArrays.jl#236. Let's see how breaking this is
1 parent 3ddcbdb commit 6409bb6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/ArrayLayouts.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ include("factorizations.jl")
126126
@inline sub_materialize(_, V, ax) = sub_materialize_axes(V, ax)
127127
@inline sub_materialize(L, V) = sub_materialize(L, V, axes(V))
128128
@inline sub_materialize(V::SubArray) = sub_materialize(MemoryLayout(V), V)
129-
@inline sub_materialize(V) = V # Anything not a SubArray is already materialized
129+
@inline sub_materialize(V) = copy(V) # Anything not a SubArray is already materialized.
130130

131131
copy(A::SubArray{<:Any,N,<:LayoutArray}) where N = sub_materialize(A)
132132
copy(A::SubArray{<:Any,N,<:AdjOrTrans{<:Any,<:LayoutArray}}) where N = sub_materialize(A)

0 commit comments

Comments
 (0)