Esempio n. 1
0
def test_basic_ne_v():
    x = RD.logistic(RD(3))
    v = RD.logarithm(RD.logistic(RD(3)), np.e)
    assert x!=v, Exception(f'test_basic_ne_v() has error.')
Esempio n. 2
0
def test_basic_log_v():
    x = RD(3) 
    derivative = RD.logarithm(x, 10)
    assert (float(derivative.val) == np.log10(3)) & (float(x.get_gradient()) == 1/(np.log(10)*3)), Exception(f'test_basic_log_v() has error.')