diff --git a/polynomial.py b/polynomial.py index a40bb9a63f90bbfa8a8fe5aed18877fd285371a8..68434ce1653b700a9af7e0b27c6f007a7d1d03e7 100644 --- a/polynomial.py +++ b/polynomial.py @@ -11,8 +11,7 @@ def unicode_superscripts(number): Returns: str: The unicode superscripts string. """ - exponent_dict = {"0": "⁰", "1": "¹", "2": "²", "3": "³", - "4": "⁴", "5": "⁵", "6": "⁶", "7": "⁷", "8": "⁸", "9": "⁹"} + exponent_dict = {"0": "⁰", "1": "¹", "2": "²", "3": "³", "4": "⁴", "5": "⁵", "6": "⁶", "7": "⁷", "8": "⁸", "9": "⁹"} return ("⁻" if number < 0 else "") + "".join(exponent_dict[x] for x in str(abs(number))) @@ -220,7 +219,7 @@ def reed_solomon(points, data_length, last_error_index, prime_number): # Parse each combination of points possible (exclude the correct points) for x in itertools.combinations(points[: last_error_index + 1], combination_length): # Create a sublist of points with all corrects points and the current combination of points - sub_points = list(x) + points[last_error_index + 1:] + sub_points = list(x) + points[last_error_index + 1 :] # Create the lagrange polynomial with the sublist of points lagrange = compute_lagrange_polynomial(sub_points, prime_number)