Example #1
0
 def test_movingsum_7(self):
     "farray.movingsum #7"  
     desired = np.array([[nan, 4.0],
                         [nan, 4.0],
                         [nan, 4.0]])
     actual = movingsum(self.x2, self.window)
     assert_almost_equal(actual, desired) 
Example #2
0
 def test_movingsum_6(self):
     "farray.movingsum #6"    
     desired = np.array([[nan,  nan,  nan,  nan,  nan],
                         [3.0,  4.0,  14.0, 0.0,  7.0]])
     actual = movingsum(self.x, self.window, axis=0, norm=False)
     assert_almost_equal(actual, desired) 
Example #3
0
 def test_movingsum_2(self):
     "farray.movingsum #2"    
     desired = self.xnan
     actual = movingsum(self.xnan, self.window, norm=False)
     assert_almost_equal(actual, desired)   
Example #4
0
 def test_movingsum_4(self):
     "farray.movingsum #4"   
     desired = np.array([[  nan, 1.0,  6.0, 6.0, 8.0],
                         [  nan, 6.0, 12.0, 8.0,-1.0]])
     actual = movingsum(self.x, self.window, norm=False)
     assert_almost_equal(actual, desired) 
Example #5
0
 def test_movingsum_1(self):
     "farray.movingsum #1"  
     desired = self.xnan 
     with np.errstate(invalid='ignore'):
         actual = movingsum(self.xnan, self.window, norm=True)
     assert_almost_equal(actual, desired)