Skip to content

Commit 07dfdd3

Browse files
authored
Update maths/dual_number_automatic_differentiation.py
1 parent 291df5c commit 07dfdd3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Diff for: maths/dual_number_automatic_differentiation.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ def __init__(self, real, rank):
1919
def __repr__(self):
2020
return (
2121
f"{self.real}+"
22-
f"{'+'.join(str(dual) + 'E' + str(n + 1) for n, dual in enumerate(self.duals))}"
22+
f"{'+'.join(str(dual) + 'E' + str(n) for n, dual in enumerate(self.duals, 1))}"
2323
)
2424

2525
def reduce(self):

0 commit comments

Comments
 (0)