Repository: climate Updated Branches: refs/heads/master f4e7bd61c -> ca9368645
CLIMATE-698 - Handling missing values in ocw.dataset_processor.temporal_rebin_with_time_index - binned_values is now a numpy.ma array Project: http://git-wip-us.apache.org/repos/asf/climate/repo Commit: http://git-wip-us.apache.org/repos/asf/climate/commit/dec62d2e Tree: http://git-wip-us.apache.org/repos/asf/climate/tree/dec62d2e Diff: http://git-wip-us.apache.org/repos/asf/climate/diff/dec62d2e Branch: refs/heads/master Commit: dec62d2e5ad0b6ed69003c034a0e9d393b8b5042 Parents: f4e7bd6 Author: huikyole <[email protected]> Authored: Wed Oct 21 18:30:05 2015 -0700 Committer: huikyole <[email protected]> Committed: Wed Oct 21 18:30:05 2015 -0700 ---------------------------------------------------------------------- ocw/dataset_processor.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/climate/blob/dec62d2e/ocw/dataset_processor.py ---------------------------------------------------------------------- diff --git a/ocw/dataset_processor.py b/ocw/dataset_processor.py index 8aebab5..90e644e 100755 --- a/ocw/dataset_processor.py +++ b/ocw/dataset_processor.py @@ -160,7 +160,7 @@ def temporal_rebin_with_time_index(target_dataset, nt_average): # nt2 is the length of time dimension in the rebinned dataset nt2 = nt/nt_average binned_dates = target_dataset.times[np.arange(nt2)*nt_average] - binned_values = np.zeros(np.insert(target_dataset.values.shape[1:],0,nt2)) + binned_values = ma.zeros(np.insert(target_dataset.values.shape[1:],0,nt2)) for it in np.arange(nt2): binned_values[it,:] = ma.average(target_dataset.values[nt_average*it:nt_average*it+nt_average,:], axis=0) new_dataset = ds.Dataset(target_dataset.lats,
