Closed
Description
Tim Besard just made the point
julia> Flatten.modify(CuArray, view(rand(2,2),:,:), Array)
ERROR: MethodError: no method matching SubArray(::CuArray{Float64,2}, ::Tuple{Base.Slice{Base.OneTo{Int64}},Base.Slice{Base.OneTo{Int64}}}, ::Int64, ::Int64)
And of course
using Setfield
sa = view(zeros(10, 10), :, :)
julia> @set sa.offset1 = 2
ERROR: MethodError: no method matching SubArray(::Array{Float64,2}, ::Tuple{Base.Slice{Base.OneTo{Int64}},Base.Slice{Base.OneTo{Int64}}}, ::Int64, ::Int64)
Should we add some constructors for common base wrapper types like SubArray
?
Metadata
Metadata
Assignees
Labels
No labels