Skip to content
Merged
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions maths/radix2_fft.py
Original file line number Diff line number Diff line change
Expand Up @@ -159,13 +159,13 @@ def __multiply(self):
# Overwrite __str__ for print(); Shows A, B and A*B
def __str__(self):
a = "A = " + " + ".join(
f"{coef}*x^{i}" for coef, i in enumerate(self.polyA[: self.len_A])
f"{coef}*x^{i}" for i, coef in enumerate(self.polyA[: self.len_A])
)
b = "B = " + " + ".join(
f"{coef}*x^{i}" for coef, i in enumerate(self.polyB[: self.len_B])
f"{coef}*x^{i}" for i, coef in enumerate(self.polyB[: self.len_B])
)
c = "A*B = " + " + ".join(
f"{coef}*x^{i}" for coef, i in enumerate(self.product)
f"{coef}*x^{i}" for i, coef in enumerate(self.product)
)

return f"{a}\n{b}\n{c}"
Expand Down
Loading