def test_Trapezoid1D():
 model = models.Trapezoid1D(amplitude=4.2, x_0=2.0, width=1.0, slope=3)
 xx = np.linspace(0, 4, 8)
 yy = model(xx)
 yy_ref = [0.0, 1.41428571, 3.12857143, 4.2, 4.2, 3.12857143, 1.41428571, 0.0]
 assert_allclose(yy, yy_ref, rtol=0, atol=1e-06)

def test_Trapezoid1D ( ) : model = models . Trapezoid1D ( amplitude = 4.2 , x_0 = 2.0 , width = 1.0 , slope = 3 ) xx = np . linspace ( 0 , 4 , 8 ) yy = model ( xx ) yy_ref = [ 0.0 , 1.41428571 , 3.12857143 , 4.2 , 4.2 , 3.12857143 , 1.41428571 , 0.0 ] assert_allclose ( yy , yy_ref , rtol = 0 , atol = 1e-06 )
regression test for URL .