Repository: climate
Updated Branches:
  refs/heads/master 03f3541a4 -> f0b28c7d6


CLIMATE-907 - Fix VisibleDeprecationWarning's in 
ocw.tests.test_dataset_processor.TestTemporalSubset

- By applying int() to central_index, the warning has been addressed.


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

Branch: refs/heads/master
Commit: 7be69902de761f426ebd639f5ec922d137d74f40
Parents: 03f3541
Author: huikyole <huiky...@argo.jpl.nasa.gov>
Authored: Wed Apr 19 14:32:00 2017 -0700
Committer: huikyole <huiky...@argo.jpl.nasa.gov>
Committed: Wed Apr 19 14:32:00 2017 -0700

----------------------------------------------------------------------
 ocw/dataset_processor.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/climate/blob/7be69902/ocw/dataset_processor.py
----------------------------------------------------------------------
diff --git a/ocw/dataset_processor.py b/ocw/dataset_processor.py
index db4a54f..917419e 100755
--- a/ocw/dataset_processor.py
+++ b/ocw/dataset_processor.py
@@ -89,7 +89,7 @@ def temporal_subset(target_dataset, month_start, month_end,
         for iyear in np.arange(nyear):
             # centered time index of the season between month_start and
             # month_end in each year
-            center_index = int(nmonth / 2) + iyear * nmonth
+            center_index = int(nmonth / 2 + iyear * nmonth)
             if nmonth == 1:
                 center_index = iyear
             averaged_time.append(new_dataset.times[center_index])

Reply via email to