예제 #1
0
def test_ADmath_secr():
    f = ADmath.sec(6)
    assert f == 1 / np.cos(6)
예제 #2
0
def test_ADmath_sec():
    f = ADmath.sec(ADnum(6, der=1))
    assert f.val == 1 / np.cos(6)
    assert f.der == np.tan(6) / np.cos(6)
    assert len(f.graph) == 1