Skip to content
This repository has been archived by the owner. It is now read-only.
Permalink
Browse files
Make sure numpy arrays have integer shape
  • Loading branch information
agoodm committed Feb 23, 2017
1 parent bd1b8ed commit 6634de72ccf87181583465a1efeb5c6c198ef8d3
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
@@ -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])
@@ -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:]

0 comments on commit 6634de7

Please sign in to comment.