Example #1
0
 def setUp(self):
     f = lambda x: sin(30*x)
     subinterval = Interval(-2,3)
     self.f = f
     self.ff = Bndfun.initfun_adaptive(f, subinterval)
     self.xx = subinterval(np.linspace(-1,1,100))
     self.emptyfun = Bndfun(Chebtech2.initempty(), subinterval)
     self.constfun = Bndfun(Chebtech2.initconst(1.), subinterval)
Example #2
0
 def setUp(self):
     f = lambda x: sin(30 * x)
     subinterval = Interval(-2, 3)
     self.f = f
     self.ff = Bndfun.initfun_adaptive(f, subinterval)
     self.xx = subinterval(np.linspace(-1, 1, 100))
     self.emptyfun = Bndfun(Chebtech2.initempty(), subinterval)
     self.constfun = Bndfun(Chebtech2.initconst(1.), subinterval)
Example #3
0
 def test_empty(self):
     ff = Chebtech2.initempty()
     self.assertEquals(ff.roots().size, 0)
Example #4
0
 def setUp(self):
     self.xx = -1 + 2 * rand(1000)
     self.emptyfun = Chebtech2.initempty()
Example #5
0
 def test_empty_construction(self):
     ff = Chebtech2.initempty()
     self.assertEquals(ff.size, 0)
     self.assertFalse(ff.isconst)
     self.assertTrue(ff.isempty)
     self.assertRaises(TypeError, Chebtech2.initempty, [1.])
Example #6
0
 def setUp(self):
     self.emptyfun = Bndfun(Chebtech2.initempty(), Interval())
     self.yy = np.linspace(-1, 1, 2000)
Example #7
0
 def setUp(self):
     self.emptyfun = Bndfun(Chebtech2.initempty(), Interval())
     self.yy = -1 + 2*rand(2000)
Example #8
0
 def test_init_empty(self):
     Chebtech2.initempty()
Example #9
0
 def setUp(self):
     self.emptyfun = Bndfun(Chebtech2.initempty(), Interval())
     self.yy = np.linspace(-1,1,2000)
Example #10
0
 def test_empty(self):
     ff = Chebtech2.initempty()
     self.assertEquals(ff.roots().size, 0)
Example #11
0
 def setUp(self):
     self.xx = -1 + 2 * np.random.rand(1000)
     self.emptyfun = Chebtech2.initempty()
Example #12
0
 def test_empty_construction(self):
     ff = Chebtech2.initempty()
     self.assertEquals(ff.size, 0)
     self.assertFalse(ff.isconst)
     self.assertTrue(ff.isempty)
     self.assertRaises(TypeError, Chebtech2.initempty, [1.])