def test_spp_exceptions(self): with self.assertRaises(ValueError): x, y, d, ds, _ = spp_method(self.delays, self.omegas, ref_point=0, fit_order=8) with self.assertRaises(ValueError): x, y, d, ds, _ = spp_method(self.delays, self.omegas, ref_point=0, fit_order=3.5)
def test_spp_not_enough_vars(self): with self.assertRaises(TypeError): x, y, d, ds, _ = spp_method( np.array([1, 2, 3]), np.array([4, 5, 6]), fit_order=4, ref_point=2.355, )
def test_spp_in_core(self): x, y, d, ds, _ = spp_method(self.delays, self.omegas, fit_order=2, ref_point=2.355) np.testing.assert_array_equal( d, [ -258.84297727172856, 21.572879102888976, 100426.4054547129, 0, 0, 0 ], )
def test_spp_invalid(self): with self.assertRaises(ValueError): x, y, d, ds, _ = spp_method(self.delays_invalid, self.omegas, fit_order=2, ref_point=2.355)