示例#1
0
 def test_log_n3(self):
     x = 0.123
     a = nthderiv.log(x, n=3)
     b = 2 / np.power(x, 3)
     assert_allclose(a, b)
示例#2
0
 def test_log_n1(self):
     x = 0.123
     a = nthderiv.log(x, n=1)
     b = 1 / x
     assert_allclose(a, b)
示例#3
0
 def test_log_n2(self):
     x = 0.123
     a = nthderiv.log(x, n=2)
     b = -1 / np.square(x)
     assert_allclose(a, b)
示例#4
0
 def test_log_n0(self):
     x = 0.123
     a = nthderiv.log(x, n=0)
     b = np.log(x)
     assert_allclose(a, b)
示例#5
0
 def test_log_n3(self):
     x = 0.123
     a = nthderiv.log(x, n=3)
     b = 2 / np.power(x, 3)
     assert_allclose(a, b)
示例#6
0
 def test_log_n2(self):
     x = 0.123
     a = nthderiv.log(x, n=2)
     b = -1 / np.square(x)
     assert_allclose(a, b)
示例#7
0
 def test_log_n1(self):
     x = 0.123
     a = nthderiv.log(x, n=1)
     b = 1 / x
     assert_allclose(a, b)
示例#8
0
 def test_log_n0(self):
     x = 0.123
     a = nthderiv.log(x, n=0)
     b = np.log(x)
     assert_allclose(a, b)