climate-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From boust...@apache.org
Subject svn commit: r1567224 - in /incubator/climate/trunk/ocw: metrics.py tests/test_metrics.py
Date Tue, 11 Feb 2014 17:12:00 GMT
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__':



Mime
View raw message