def test_discretize_callable_1d():
 def f(x):
  return (x ** 2)
 y = discretize_model(f, ((-5), 6))
 assert_allclose(y, (np.arange((-5), 6) ** 2))

def test_discretize_callable_1d ( ) : def f ( x ) : return ( x ** 2 ) y = discretize_model ( f , ( ( - 5 ) , 6 ) ) assert_allclose ( y , ( np . arange ( ( - 5 ) , 6 ) ** 2 ) )
test discretize when a 1d function is passed .