From 7ceacadcb50d94bd81c112c1d73e8d9780a4fac0 Mon Sep 17 00:00:00 2001 From: Shunsuke Hori Date: Mon, 26 Mar 2018 20:09:58 -0700 Subject: [PATCH] be more specific --- src/filter.jl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/filter.jl b/src/filter.jl index e32a10dc..3add618e 100644 --- a/src/filter.jl +++ b/src/filter.jl @@ -77,7 +77,7 @@ Note: For seasonal data, it's desirable for `p` and `h` to be integer multiples - `y_cycle::Vector` : cyclical component - `y_trend::Vector` : trend component """ -function hamilton_filter(y::AbstractVector, h::Integer, p::Integer) +function hamilton_filter(y::Vector, h::Integer, p::Integer) T = length(y) y_cycle = fill(NaN, T) @@ -132,7 +132,7 @@ Note: For seasonal data, it's desirable for `h` to be an integer multiple - `y_cycle::Vector` : cyclical component - `y_trend::Vector` : trend component """ -function hamilton_filter(y::AbstractVector, h::Integer) +function hamilton_filter(y::Vector, h::Integer) T = length(y) y_cycle = fill(NaN, T) y_cycle[h+1:T] = y[h+1:T] - y[1:T-h]