trivial bug fix
Project: http://git-wip-us.apache.org/repos/asf/climate/repo Commit: http://git-wip-us.apache.org/repos/asf/climate/commit/4ca7e339 Tree: http://git-wip-us.apache.org/repos/asf/climate/tree/4ca7e339 Diff: http://git-wip-us.apache.org/repos/asf/climate/diff/4ca7e339 Branch: refs/heads/master Commit: 4ca7e339e270840307acacd1b0ad3654f795b0f4 Parents: 8ff11aa Author: huikyole <[email protected]> Authored: Mon Oct 5 17:42:59 2015 -0700 Committer: huikyole <[email protected]> Committed: Mon Oct 5 17:42:59 2015 -0700 ---------------------------------------------------------------------- ocw/evaluation.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/climate/blob/4ca7e339/ocw/evaluation.py ---------------------------------------------------------------------- diff --git a/ocw/evaluation.py b/ocw/evaluation.py index fef5a0f..8f01a68 100644 --- a/ocw/evaluation.py +++ b/ocw/evaluation.py @@ -357,7 +357,7 @@ def convert_evaluation_result(evaluation_result, subregion = False): nmetric = len(evaluation_result[0]) results = [] for imetric in range(nmetric): - if evaluation_result[0][imetric].ndim >=2: + if evaluation_result[0][imetric].ndim !=0: result_shape = list(evaluation_result[0][imetric].shape) result_shape.insert(0, nmodel) result = ma.zeros(result_shape) @@ -378,7 +378,7 @@ def convert_evaluation_result(evaluation_result, subregion = False): for isubregion in range(nsubregion): subregion_results = [] for imetric in range(nmetric): - if evaluation_result[0][imetric][isubregion].ndim >=2: + if evaluation_result[0][imetric][isubregion].ndim !=0: result_shape = list(evaluation_result[0][imetric][isubregion].shape) result_shape.insert(0, nmodel) result = ma.zeros(result_shape) @@ -398,7 +398,7 @@ def convert_unary_evaluation_result(evaluation_result, subregion = False): nmodel = len(evaluation_result[0]) results = [] for imetric in range(nmetric): - if evaluation_result[imetric][0].ndim >=2: + if evaluation_result[imetric][0].ndim !=0: result_shape = list(evaluation_result[imetric][0].shape) result_shape.insert(0, nmodel) result = ma.zeros(result_shape) @@ -419,7 +419,7 @@ def convert_unary_evaluation_result(evaluation_result, subregion = False): for isubregion in range(nsubregion): subregion_results = [] for imetric in range(nmetric): - if evaluation_result[imetric][isubregion][0].ndim >=2: + if evaluation_result[imetric][isubregion][0].ndim !=0: result_shape = list(evaluation_result[imetric][isubregion][0].shape) result_shape.insert(0, nmodel) result = ma.zeros(result_shape)
