We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent cde0824 commit 098f4e9Copy full SHA for 098f4e9
base/subarray.jl
@@ -339,7 +339,6 @@ end
339
function getindex(V::FastContiguousSubArray{<:Any, 1}, i::AbstractUnitRange{Int})
340
@inline
341
@boundscheck checkbounds(V, i)
342
- v = @view V.parent[V.offset1 .+ UnitRange(i)]
343
out = similar(V, axes(i))
344
li = length(i)
345
if li > 0
test/subarray.jl
@@ -536,6 +536,10 @@ end
536
c1 = a12[ind1]
537
@test (c1[axes(c1,1)] = a12[ind1]; c1) == (c1[:] = a12[ind1]; c1) == a12[ind1]
538
539
+ inds1 = Base.IdentityUnitRange(Base.OneTo(4))
540
+ c1 = @view a1[inds1]
541
+ @test (c1[eachindex(c1)] = @view(a12[inds1]); c1) == @view(a12[inds1])
542
+
543
ind2 = 2:2:8
544
d1 = a12[ind2]
545
@test (d1[axes(d1,1)] = a12[ind2]; d1) == (d1[:] = a12[ind2]; d1) == a12[ind2]
0 commit comments