Repository: climate Updated Branches: refs/heads/master 7741c0af6 -> 9557020cf
CLIMATE-901 - Debugging calc_histogram_overlap - ocw.metrics.calc_histogram_overlap has been updated. Project: http://git-wip-us.apache.org/repos/asf/climate/repo Commit: http://git-wip-us.apache.org/repos/asf/climate/commit/11458e7c Tree: http://git-wip-us.apache.org/repos/asf/climate/tree/11458e7c Diff: http://git-wip-us.apache.org/repos/asf/climate/diff/11458e7c Branch: refs/heads/master Commit: 11458e7c4b2045166b04fd0ff641b45e581f24ed Parents: 7741c0a Author: huikyole <[email protected]> Authored: Wed Mar 8 09:34:18 2017 -0800 Committer: huikyole <[email protected]> Committed: Wed Mar 8 09:34:18 2017 -0800 ---------------------------------------------------------------------- ocw/metrics.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/climate/blob/11458e7c/ocw/metrics.py ---------------------------------------------------------------------- diff --git a/ocw/metrics.py b/ocw/metrics.py index ecd686c..cd027f0 100644 --- a/ocw/metrics.py +++ b/ocw/metrics.py @@ -371,8 +371,8 @@ def calc_histogram_overlap(hist1, hist2): err = "The two histograms have different sizes" raise ValueError(err) overlap = 0. - for ii in len(hist1_flat): - overlap = overlap + numpy.min(hist1_flat[ii], hist2_flat[ii]) + for ii in numpy.arange(len(hist1_flat)): + overlap = overlap + numpy.min([hist1_flat[ii], hist2_flat[ii]]) return overlap
