You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@climate.apache.org by bo...@apache.org on 2014/02/11 18:12:00 UTC
svn commit: r1567224 - in /incubator/climate/trunk/ocw: metrics.py
tests/test_metrics.py
Author: boustani
Date: Tue Feb 11 17:11:59 2014
New Revision: 1567224
URL: http://svn.apache.org/r1567224
Log:
[CLIMATE-339] Fix typo in metrics.py and modify test_metrics.py
Modified:
incubator/climate/trunk/ocw/metrics.py
incubator/climate/trunk/ocw/tests/test_metrics.py
Modified: incubator/climate/trunk/ocw/metrics.py
URL: http://svn.apache.org/viewvc/incubator/climate/trunk/ocw/metrics.py?rev=1567224&r1=1567223&r2=1567224&view=diff
==============================================================================
--- incubator/climate/trunk/ocw/metrics.py (original)
+++ incubator/climate/trunk/ocw/metrics.py Tue Feb 11 17:11:59 2014
@@ -98,4 +98,4 @@ class TemporalStdDev(UnaryMetric):
:returns: The temporal standard deviation of the target dataset
:rtype: Numpy Array
'''
- return target_dataset.values.std(axi=0, ddof=1)
+ return target_dataset.values.std(axis=0, ddof=1)
Modified: incubator/climate/trunk/ocw/tests/test_metrics.py
URL: http://svn.apache.org/viewvc/incubator/climate/trunk/ocw/tests/test_metrics.py?rev=1567224&r1=1567223&r2=1567224&view=diff
==============================================================================
--- incubator/climate/trunk/ocw/tests/test_metrics.py (original)
+++ incubator/climate/trunk/ocw/tests/test_metrics.py Tue Feb 11 17:11:59 2014
@@ -74,8 +74,8 @@ class TestTemporalStdDev(unittest.TestCa
def test_function_run(self):
'''Test TemporalStdDev function for target dataset.'''
- expected_result = np.zeros((12, 5),)
- expected_result.fill(7.90569415)
+ expected_result = np.zeros((5, 5),)
+ expected_result.fill(90.13878189)
npt.assert_almost_equal(self.temporal_std_dev.run(self.target_dataset), expected_result)
if __name__ == '__main__':