Skip to content

Commit a79a28e

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

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

Diff for: maths/dual_number_automatic_differentiation.py

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

2526
def reduce(self):

0 commit comments

Comments
 (0)