From 4703235f9fe21fab6c6025b60e1d8a9d267f025b Mon Sep 17 00:00:00 2001
From: David Hoese <davidh@ssec.wisc.edu>
Date: Fri, 18 Sep 2009 20:07:16 +0000
Subject: [PATCH] not perfect

---
 metobs/data/filter.py | 1 +
 1 file changed, 1 insertion(+)

diff --git a/metobs/data/filter.py b/metobs/data/filter.py
index 1e82c15..443453a 100644
--- a/metobs/data/filter.py
+++ b/metobs/data/filter.py
@@ -26,6 +26,7 @@ def filter_arr(arr, threshold, fill_value=None):
     step = 10
     m = zeros(arr.shape[0])
     for i in range(0, arr.shape[0], step):
+        if arr.shape[0] - i < step: step = arr.shape[0] - i
         for j in range(step):
             mean = (arr[i:(i+step)].cumsum()[-1] - arr[i+j])/(step-1)
             df = abs(mean - arr[i+j])
-- 
GitLab