Ejemplo n.º 1
0
 def test_cen_diff4_zero_slope(self):
     np.testing.assert_array_equal(
         FiniteDiff.cen_diff4(self.ones, self.arange), self.zeros_trunc4)
     np.testing.assert_array_equal(
         FiniteDiff.cen_diff4(self.zeros, self.arange), self.zeros_trunc4)
     np.testing.assert_array_equal(FiniteDiff.cen_diff4(self.zeros, 1.),
                                   self.zeros_trunc4)
Ejemplo n.º 2
0
 def test_cen_diff4_zero_slope(self):
     np.testing.assert_array_equal(FiniteDiff.cen_diff4(self.ones,
                                                        self.arange),
                                   self.zeros_trunc4)
     np.testing.assert_array_equal(FiniteDiff.cen_diff4(self.zeros,
                                                        self.arange),
                                   self.zeros_trunc4)
     np.testing.assert_array_equal(FiniteDiff.cen_diff4(self.zeros, 1.),
                                   self.zeros_trunc4)
Ejemplo n.º 3
0
 def test_cen_diff4_constant_slope(self):
     np.testing.assert_array_equal(FiniteDiff.cen_diff4(self.arange, 1.),
                                   self.ones_trunc4)
     np.testing.assert_array_equal(FiniteDiff.cen_diff4(self.arange*-2.5,
                                                        1.),
                                   self.ones_trunc4*-2.5)
Ejemplo n.º 4
0
 def test_cen_diff4_constant_slope(self):
     np.testing.assert_array_equal(FiniteDiff.cen_diff4(self.arange, 1.),
                                   self.ones_trunc4)
     np.testing.assert_array_equal(
         FiniteDiff.cen_diff4(self.arange * -2.5, 1.),
         self.ones_trunc4 * -2.5)