def test_logarithmic(self): N = 4000. x = arange(N) y = arange(N) new_x = arange(N)+0.5 new_y = logarithmic(x, y, new_x) correct_y = [np.NaN, 1.41421356, 2.44948974, 3.46410162, 4.47213595] self.assertAllclose(new_y[:5], correct_y)
def test_logarithmic(self): N = 4000. x = arange(N) y = arange(N) new_x = arange(N) + 0.5 new_y = logarithmic(x, y, new_x) correct_y = [np.NaN, 1.41421356, 2.44948974, 3.46410162, 4.47213595] self.assertAllclose(new_y[:5], correct_y)
def test_logarithmic(self): N = 4000. x = arange(N) y = arange(N) new_x = arange(N) + 0.5 with warnings.catch_warnings(): warnings.simplefilter("ignore", DeprecationWarning) new_y = logarithmic(x, y, new_x) correct_y = [np.NaN, 1.41421356, 2.44948974, 3.46410162, 4.47213595] self.assertAllclose(new_y[:5], correct_y)
def test_logarithmic(self): N = 4000. x = arange(N) y = arange(N) new_x = arange(N) + 0.5 with suppress_warnings() as sup: sup.filter(DeprecationWarning, "`logarithmic` is deprecated") new_y = logarithmic(x, y, new_x) correct_y = [np.NaN, 1.41421356, 2.44948974, 3.46410162, 4.47213595] assert_allclose(new_y[:5], correct_y)
def test_logarithmic(self): N = 4000. x = arange(N) y = arange(N) new_x = arange(N)+0.5 with suppress_warnings() as sup: sup.filter(DeprecationWarning, "`logarithmic` is deprecated") new_y = logarithmic(x, y, new_x) correct_y = [np.NaN, 1.41421356, 2.44948974, 3.46410162, 4.47213595] assert_allclose(new_y[:5], correct_y)
def test_logarithmic(self): N = 4000. x = arange(N) y = arange(N) new_x = arange(N)+0.5 with warnings.catch_warnings(): warnings.simplefilter("ignore", DeprecationWarning) new_y = logarithmic(x, y, new_x) correct_y = [np.NaN, 1.41421356, 2.44948974, 3.46410162, 4.47213595] self.assertAllclose(new_y[:5], correct_y)
def test_logarithmic(self): N = 4000. x = arange(N) y = arange(N) new_x = arange(N)+0.5 t1 = time.clock() new_y = logarithmic(x, y, new_x) t2 = time.clock() #print "time for logarithmic interpolation with N = %i:" % N, t2 - t1 correct_y = [np.NaN, 1.41421356, 2.44948974, 3.46410162, 4.47213595] self.assertAllclose(new_y[:5], correct_y)
def test_logarithmic(self): N = 4000. x = arange(N) y = arange(N) new_x = arange(N) + 0.5 t1 = time.clock() new_y = logarithmic(x, y, new_x) t2 = time.clock() #print "time for logarithmic interpolation with N = %i:" % N, t2 - t1 correct_y = [np.NaN, 1.41421356, 2.44948974, 3.46410162, 4.47213595] self.assertAllclose(new_y[:5], correct_y)