def test_fwd_diff2_zero_slope(self): np.testing.assert_array_equal(calcs.fwd_diff2(self.ones, self.arange), self.zeros_trunc2) np.testing.assert_array_equal(calcs.fwd_diff2(self.zeros, self.arange), self.zeros_trunc2) np.testing.assert_array_equal(calcs.fwd_diff2(self.zeros, 1.), self.zeros_trunc2)
def test_fwd_diff2_constant_slope(self): np.testing.assert_array_equal(calcs.fwd_diff2(self.arange, 1.), self.ones_trunc2) np.testing.assert_array_equal(calcs.fwd_diff2(self.arange * -2.5, 1.), self.ones_trunc2 * -2.5)