Skip to content

Commit

Permalink
Update dual_number_automatic_differentiation.py
Browse files Browse the repository at this point in the history
  • Loading branch information
cclauss authored Jan 13, 2025
1 parent 108e9ca commit 90feebd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion maths/dual_number_automatic_differentiation.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ def __init__(self, real, rank):
def __repr__(self):
return (
f"{self.real}+"
f"{'+'.join('{dual}E{n}'.format(dual, n) for n, dual in enumerate(self.duals, 1))}"
f"{'+'.join('{}E{}'.format(dual, n) for n, dual in enumerate(self.duals, 1))}"

Check failure on line 22 in maths/dual_number_automatic_differentiation.py

View workflow job for this annotation

GitHub Actions / ruff

Ruff (UP032)

maths/dual_number_automatic_differentiation.py:22:25: UP032 Use f-string instead of `format` call

Check failure on line 22 in maths/dual_number_automatic_differentiation.py

View workflow job for this annotation

GitHub Actions / ruff

Ruff (E501)

maths/dual_number_automatic_differentiation.py:22:89: E501 Line too long (90 > 88)
)

def reduce(self):
Expand Down

0 comments on commit 90feebd

Please sign in to comment.