Skip to content

Commit a291f1b

Browse files
Fix enumeration order in FFT string representation
1 parent 5a1305b commit a291f1b

1 file changed

Lines changed: 9 additions & 9 deletions

File tree

maths/radix2_fft.py

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -157,15 +157,15 @@ def __multiply(self):
157157

158158
# Overwrite __str__ for print(); Shows A, B and A*B
159159
def __str__(self):
160-
a = "A = " + " + ".join(
161-
f"{coef}*x^{i}" for coef, i in enumerate(self.polyA[: self.len_A])
162-
)
163-
b = "B = " + " + ".join(
164-
f"{coef}*x^{i}" for coef, i in enumerate(self.polyB[: self.len_B])
165-
)
166-
c = "A*B = " + " + ".join(
167-
f"{coef}*x^{i}" for coef, i in enumerate(self.product)
168-
)
160+
a = "A = " + " + ".join(
161+
f"{coef}*x^{i}" for i, coef in enumerate(self.polyA[: self.len_A])
162+
)
163+
b = "B = " + " + ".join(
164+
f"{coef}*x^{i}" for i, coef in enumerate(self.polyB[: self.len_B])
165+
)
166+
c = "A*B = " + " + ".join(
167+
f"{coef}*x^{i}" for i, coef in enumerate(self.product)
168+
)
169169

170170
return f"{a}\n{b}\n{c}"
171171

0 commit comments

Comments
 (0)