예제 #1
0
 def test_linlog(self):
     ylinlog = viz._estimate_from_fit(self.x, self.slope, self.intercept,
                                           xlog=False, ylog=True)
     percent_diff = numpy.abs(ylinlog - self.known_ylinlog) / self.known_ylinlog
     nptest.assert_array_almost_equal(
         percent_diff,
         numpy.zeros(self.x.shape[0]),
         decimal=5
     )
예제 #2
0
 def test_linlog(self):
     ylinlog = viz._estimate_from_fit(self.x, self.slope, self.intercept,
                                           xlog=False, ylog=True)
     percent_diff = np.abs(ylinlog - self.known_ylinlog) / self.known_ylinlog
     nptest.assert_array_almost_equal(
         percent_diff,
         np.zeros(self.x.shape[0]),
         decimal=5
     )
예제 #3
0
 def test_loglog(self):
     yloglog = viz._estimate_from_fit(self.x, self.slope, self.intercept,
                                           xlog=True, ylog=True)
     nptest.assert_array_almost_equal(yloglog, self.known_yloglog)
예제 #4
0
 def test_linlin(self):
     ylinlin = viz._estimate_from_fit(self.x, self.slope, self.intercept,
                                           xlog=False, ylog=False)
     nptest.assert_array_almost_equal(ylinlin, self.known_ylinlin)
예제 #5
0
 def test_loglog(self):
     yloglog = viz._estimate_from_fit(self.x, self.slope, self.intercept,
                                           xlog=True, ylog=True)
     nptest.assert_array_almost_equal(yloglog, self.known_yloglog)
예제 #6
0
 def test_linlin(self):
     ylinlin = viz._estimate_from_fit(self.x, self.slope, self.intercept,
                                           xlog=False, ylog=False)
     nptest.assert_array_almost_equal(ylinlin, self.known_ylinlin)