Beispiel #1
0
    def testPoly(self):
        fr = fit.polyfit(self.x, self.y, 1)
    
        print 'Poly: ', fr  # print polynomial coeffs
        self.checkitems([3.2, 0.37], fr, 1)

        fr = fit.polyfit(self.x, self.z, 2)
    
        print 'Poly: ', fr  # print polynomial coeffs
        self.checkitems([3.2, -12.2, 0.4], fr, 1)
Beispiel #2
0
    def testPoly(self):
        fr = fit.polyfit(self.x, self.y, 1)

        print('Poly: ', fr)  # print polynomial coeffs
        self.checkitems([3.2, 0.37], fr, 1)

        fr = fit.polyfit(self.x, self.z, 2)

        print('Poly: ', fr)  # print polynomial coeffs
        self.checkitems([3.2, -12.2, 0.4], fr, 1)
Beispiel #3
0
    def testPoly(self):
        fr = fit.polyfit(self.x, self.y, 1)
    
        print 'Poly: ', fr  # print polynomial coeffs
        self.checkitems([3.2, 0.35], fr, 1)

        fr = fit.polyfit(self.x, self.z, 2)
    
        print 'Poly: ', fr  # print polynomial coeffs
        self.checkitems([3.2, -12.2, 0.35], fr, 1)

        v = fit.polyval(fr, [0,1])
        print 'value is', dnp.abs(v-0.3)
        self.checkitems([0.1, -9], v, 1)
Beispiel #4
0
 def testPolyVal(self):
     fr = fit.polyfit(self.x, self.y, 1)
     v = fit.polyval(fr, [0,1])
     print 'value is', dnp.abs(v-0.3)
     self.checkitems([0.36, 3.55], v, 0)
Beispiel #5
0
 def testPolyVal(self):
     fr = fit.polyfit(self.x, self.y, 1)
     v = fit.polyval(fr, [0, 1])
     print('value is', dnp.abs(v - 0.3))
     self.checkitems([0.36, 3.55], v, 0)