Esempio n. 1
0
 def get_data(self):
     data = Data('exponential_data')
     model = self.get_model()
     function = model.lambdify('exp', ('t', 'a', 'k'), modules='numpy')
     linspace = numpy.linspace(-1, 1, 300, endpoint=True)
     data.array = numpy.array([ linspace, function(linspace, 2, 3) ])
     return data
Esempio n. 2
0
 def test_limits_symmetric(self):
     data = Data()
     data.array = numpy.array([ [-2, 1], [3, 4] ])
     fit = Fit(data=data)
     eq_(fit.limits, (-2, 2))
Esempio n. 3
0
 def test_limits(self):
     data = Data()
     data.array = numpy.array([ [1, 2], [3, 4] ])
     fit = Fit(data=data)
     eq_(fit.limits, (0, 2))