def test_delta_delta_points(): t = [1.0, 2.0, 4.0, 5.1] result = np.array([1.0, 1.1, 2.0, 3.0, 3.1, 4.1]) d1, d2 = lc.delta_delta_points(t, t) assert np.all(np.diff(d1) >= 0) assert np.all(np.abs(d1 - result) < 1e-10) assert np.all(np.abs(d2 - result) < 1e-10)
def test_delta_delta_points(): t = [1.,2.,4., 5.1] result = np.array([1.,1.1,2.,3.,3.1,4.1]) d1, d2 = lc.delta_delta_points(t, t) assert np.all(np.diff(d1) >= 0) assert np.all(np.abs(d1 - result) < 1e-10) assert np.all(np.abs(d2 - result) < 1e-10)
def test_input_checking2(): with pytest.raises(ValueError): lc.delta_delta_points([1.0, 5.0], np.arange(3))
def test_input_checking2(): with pytest.raises(ValueError): lc.delta_delta_points([1.,5.], np.arange(3))