Repository: climate
Updated Branches:
  refs/heads/master 818784ede -> 1c85945fa


CLIMATE-860 - Fix dataset_processor.temporal_subset to remove the warning 
message

- dataset_processor.temporal_subset has been updated.


Project: http://git-wip-us.apache.org/repos/asf/climate/repo
Commit: http://git-wip-us.apache.org/repos/asf/climate/commit/be1cc1a3
Tree: http://git-wip-us.apache.org/repos/asf/climate/tree/be1cc1a3
Diff: http://git-wip-us.apache.org/repos/asf/climate/diff/be1cc1a3

Branch: refs/heads/master
Commit: be1cc1a36a2847595359e14a0a36e9dc70f5336d
Parents: 818784e
Author: huikyole <huiky...@argo.jpl.nasa.gov>
Authored: Wed Aug 24 16:17:07 2016 -0700
Committer: huikyole <huiky...@argo.jpl.nasa.gov>
Committed: Wed Aug 24 16:17:07 2016 -0700

----------------------------------------------------------------------
 ocw/dataset_processor.py | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/climate/blob/be1cc1a3/ocw/dataset_processor.py
----------------------------------------------------------------------
diff --git a/ocw/dataset_processor.py b/ocw/dataset_processor.py
index 072f771..36e337a 100755
--- a/ocw/dataset_processor.py
+++ b/ocw/dataset_processor.py
@@ -63,10 +63,8 @@ def temporal_subset(target_dataset, month_start, month_end,
     months = np.array([d.month for d in dates])
     time_index = []
     for m_value in month_index:
-        time_index = np.append(time_index, np.where(months == m_value)[0])
-    time_index = np.sort(time_index)
-
-    time_index = list(time_index)
+        time_index.extend(list(np.where(months == m_value)[0]))
+    time_index.sort()
 
     new_dataset = ds.Dataset(target_dataset.lats,
                              target_dataset.lons,

Reply via email to