Skip to content

Commit a06a636

Browse files
author
Michael Abbott
committed
rename no_offsets to no_wraps
1 parent 0bfcbf2 commit a06a636

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

src/LazyStack.jl

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -207,7 +207,7 @@ function vstack_plus(itr)
207207
n = Base.haslength(itr) ? prod(s)*length(itr) : nothing
208208

209209
v = similar_vector(val, something(n, prod(s)))
210-
copyto!(v, 1, no_offsets(val), 1, prod(s))
210+
copyto!(v, 1, no_wraps(val), 1, prod(s))
211211

212212
w = stack_rest(v, 0, n, s, itr, state)::Vector
213213
w, val
@@ -224,9 +224,9 @@ function stack_rest(v, i, n, s, itr, state)
224224
i += 1
225225
if eltype(val) <: eltype(v)
226226
if n isa Int
227-
copyto!(v, i*prod(s)+1, no_offsets(val), 1, prod(s))
227+
copyto!(v, i*prod(s)+1, no_wraps(val), 1, prod(s))
228228
else
229-
append!(v, vec(no_offsets(val)))
229+
append!(v, vec(no_wraps(val)))
230230
end
231231
else
232232

@@ -236,9 +236,9 @@ function stack_rest(v, i, n, s, itr, state)
236236
copyto!(v′, v)
237237

238238
if n isa Int
239-
copyto!(v′, i*prod(s)+1, no_offsets(val), 1, prod(s))
239+
copyto!(v′, i*prod(s)+1, no_wraps(val), 1, prod(s))
240240
else
241-
append!(v′, vec(no_offsets(val)))
241+
append!(v′, vec(no_wraps(val)))
242242
end
243243

244244
return stack_rest(v′, i, n, s, itr, state)
@@ -272,8 +272,8 @@ end
272272

273273
using OffsetArrays
274274

275-
no_offsets(a) = a
276-
no_offsets(a::OffsetArray) = parent(a)
275+
no_wraps(a) = a
276+
no_wraps(a::OffsetArray) = parent(a)
277277

278278
similar_vector(a::OffsetArray, n::Int) = similar_vector(parent(a), n)
279279

@@ -327,7 +327,7 @@ function rewrap_like(A, a::NamedDimsArray{L}) where {L}
327327
ensure_named(B, (L..., ntuple(_ -> :_, ndims(A) - ndims(a))...))
328328
end
329329

330-
no_offsets(a::NamedDimsArray) = no_offsets(parent(a)) # perhaps rename to no_wrap?
330+
no_wraps(a::NamedDimsArray) = no_wraps(parent(a))
331331

332332
"""
333333
stack(name, things...)

0 commit comments

Comments
 (0)