def test_ADmath_secr(): f = ADmath.sec(6) assert f == 1 / np.cos(6)
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