Skip to content

Commit 5da2ae3

Browse files
committed
Check for nan time steps and skip them
1 parent 4264210 commit 5da2ae3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/rqatrend.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ function tau_rr(y, d; thresh=2, metric=CheckedEuclidean())
117117
nominator = 0
118118
denominator = 0
119119
@inbounds for i in 1:length(y)-d
120-
if y[i] === missing || y[i+d] === missing
120+
if y[i] === missing || y[i+d] === missing|| isnan(y[i]) || isnan(y[i+d])
121121
continue
122122
end
123123
nominator += evaluate(metric, y[i], y[i+d]) <= _thresh

0 commit comments

Comments
 (0)