[Scipy-svn] r6602 - branches/0.8.x/scipy/interpolate/tests
scipy-svn at scipy.org
scipy-svn at scipy.org
Tue Jul 13 09:24:16 EDT 2010
Author: rgommers
Date: 2010-07-13 08:24:16 -0500 (Tue, 13 Jul 2010)
New Revision: 6602
Modified:
branches/0.8.x/scipy/interpolate/tests/test_rbf.py
Log:
TST: Add test for constructing interpolate.Rbf with a callable.
Modified: branches/0.8.x/scipy/interpolate/tests/test_rbf.py
===================================================================
--- branches/0.8.x/scipy/interpolate/tests/test_rbf.py 2010-07-13 13:07:43 UTC (rev 6601)
+++ branches/0.8.x/scipy/interpolate/tests/test_rbf.py 2010-07-13 13:24:16 UTC (rev 6602)
@@ -83,4 +83,13 @@
rbf = Rbf(x, y)
yi = rbf(x)
assert_array_almost_equal(y, yi)
-
+
+
+def test_function_is_callable():
+ """Check that the Rbf class can be constructed with function=callable."""
+ x = linspace(0,10,9)
+ y = sin(x)
+ linfunc = lambda x:x
+ rbf = Rbf(x, y, function=linfunc)
+ yi = rbf(x)
+ assert_array_almost_equal(y, yi)
More information about the Scipy-svn
mailing list