@@ -207,7 +207,7 @@ function vstack_plus(itr)
207
207
n = Base. haslength (itr) ? prod (s)* length (itr) : nothing
208
208
209
209
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))
211
211
212
212
w = stack_rest (v, 0 , n, s, itr, state):: Vector
213
213
w, val
@@ -224,9 +224,9 @@ function stack_rest(v, i, n, s, itr, state)
224
224
i += 1
225
225
if eltype (val) <: eltype (v)
226
226
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))
228
228
else
229
- append! (v, vec (no_offsets (val)))
229
+ append! (v, vec (no_wraps (val)))
230
230
end
231
231
else
232
232
@@ -236,9 +236,9 @@ function stack_rest(v, i, n, s, itr, state)
236
236
copyto! (v′, v)
237
237
238
238
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))
240
240
else
241
- append! (v′, vec (no_offsets (val)))
241
+ append! (v′, vec (no_wraps (val)))
242
242
end
243
243
244
244
return stack_rest (v′, i, n, s, itr, state)
272
272
273
273
using OffsetArrays
274
274
275
- no_offsets (a) = a
276
- no_offsets (a:: OffsetArray ) = parent (a)
275
+ no_wraps (a) = a
276
+ no_wraps (a:: OffsetArray ) = parent (a)
277
277
278
278
similar_vector (a:: OffsetArray , n:: Int ) = similar_vector (parent (a), n)
279
279
@@ -327,7 +327,7 @@ function rewrap_like(A, a::NamedDimsArray{L}) where {L}
327
327
ensure_named (B, (L... , ntuple (_ -> :_ , ndims (A) - ndims (a))... ))
328
328
end
329
329
330
- no_offsets (a:: NamedDimsArray ) = no_offsets (parent (a)) # perhaps rename to no_wrap?
330
+ no_wraps (a:: NamedDimsArray ) = no_wraps (parent (a))
331
331
332
332
"""
333
333
stack(name, things...)
0 commit comments