Skip to content

Commit 23839d1

Browse files
author
Michael Abbott
committed
Base.unaliascopy
1 parent e8a79cf commit 23839d1

File tree

1 file changed

+2
-16
lines changed

1 file changed

+2
-16
lines changed

src/LazyStack.jl

Lines changed: 2 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,8 @@ inner_ndims(x::Stacked) = ndims(x) - outer_ndims(x)
102102
@inbounds getindex(outer, ntuple(d -> inds[d], IN)...)::T
103103
end
104104

105+
Base.unaliascopy(x::Stacked) = stack(map(Base.unaliascopy, x.slices))
106+
105107
if VERSION >= v"1.1"
106108
Base.eachcol(x::Stacked{T,2,<:AbstractArray{<:AbstractArray{T,1}}}) where {T} = x.slices
107109
end
@@ -317,22 +319,6 @@ stack(x::AT) where {AT <: Tuple{Vararg{NamedDimsArray{L,T,IN}}}} where {T,IN,L}
317319
getnames(xs::Tuple{Vararg{<:NamedDimsArray}}) =
318320
(dimnames(first(xs))..., :_)
319321

320-
# generators
321-
#=
322-
function stack(xs::Base.Generator{<:NamedDimsArray{L}}) where {L}
323-
w = stack_iter(xs)
324-
l = (ntuple(_ -> :_, ndims(w)-length(L))..., L...)
325-
ensure_named(w, l)
326-
end
327-
328-
function stack(xs::Base.Generator{<:Iterators.ProductIterator{<:Tuple{<:NamedDimsArray}}})
329-
w = stack_iter(xs)
330-
L = Tuple(Iterators.flatten(map(dimnames, ms.iter.iterators)))
331-
l = (ntuple(_ -> :_, ndims(w)-length(L))..., L...)
332-
ensure_named(w, l)
333-
end
334-
=#
335-
336322
function rewrap_like(A, a::NamedDimsArray{L}) where {L}
337323
B = rewrap_like(A, parent(a))
338324
ensure_named(B, (L..., ntuple(_ -> :_, ndims(A) - ndims(a))...))

0 commit comments

Comments
 (0)