diff --git a/src/split.jl b/src/split.jl index b3dae001..13688d1e 100644 --- a/src/split.jl +++ b/src/split.jl @@ -23,8 +23,10 @@ to(ta::TimeArray{T, N, D}, d::D) where {T, N, D} = Base.findall(ta::TimeArray{Bool,1}) = findall(values(ta)) Base.findall(f::Function, ta::TimeArray{T,1}) where {T} = findall(f, values(ta)) -Base.findall(f::Function, ta::TimeArray{T,2}) where {T} = - collect(i for (i, x) ∈ enumerate(eachrow(values(ta))) if f(x)) +function Base.findall(f::Function, ta::TimeArray{T,2}) where {T} + A = values(ta) + collect(i for i in axes(A, 1) if f(view(A, i, :))) +end ###### findwhen #################