Repository: climate
Updated Branches:
  refs/heads/master bd1b8edef -> 6634de72c


Make sure numpy arrays have integer shape


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

Branch: refs/heads/master
Commit: 6634de72ccf87181583465a1efeb5c6c198ef8d3
Parents: bd1b8ed
Author: Alex Goodman <ago...@users.noreply.github.com>
Authored: Thu Feb 23 14:36:11 2017 -0800
Committer: Alex Goodman <ago...@users.noreply.github.com>
Committed: Thu Feb 23 14:36:11 2017 -0800

----------------------------------------------------------------------
 ocw/dataset_processor.py | 2 +-
 ocw/utils.py             | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/climate/blob/6634de72/ocw/dataset_processor.py
----------------------------------------------------------------------
diff --git a/ocw/dataset_processor.py b/ocw/dataset_processor.py
index b4c1b41..98e6899 100755
--- a/ocw/dataset_processor.py
+++ b/ocw/dataset_processor.py
@@ -77,7 +77,7 @@ def temporal_subset(target_dataset, month_start, month_end,
     if average_each_year:
         nmonth = len(month_index)
         ntime = new_dataset.times.size
-        nyear = ntime / nmonth
+        nyear = ntime // nmonth
         averaged_time = []
         ny, nx = target_dataset.values.shape[1:]
         averaged_values = ma.zeros([nyear, ny, nx])

http://git-wip-us.apache.org/repos/asf/climate/blob/6634de72/ocw/utils.py
----------------------------------------------------------------------
diff --git a/ocw/utils.py b/ocw/utils.py
index abd793c..7128793 100755
--- a/ocw/utils.py
+++ b/ocw/utils.py
@@ -271,7 +271,7 @@ def reshape_monthly_to_annually(dataset):
     values = dataset.values[:]
     data_shape = values.shape
     num_total_month = data_shape[0]
-    num_year = num_total_month / 12
+    num_year = num_total_month // 12
     num_month = 12
     year_month_shape = num_year, num_month
     lat_lon_shape = data_shape[1:]

Reply via email to