def test_trace_1dim(): adobj = AD(lambda x: 3) trace = adobj._buildtrace(2) assert len(trace) == 1
def test_trace(): adobj = AD(lambda x, y: x + y) trace = adobj._buildtrace(1, 2) assert len(trace) == 3