Skip to content
Snippets Groups Projects
Commit 077fa6fa authored by gawen.ackerman's avatar gawen.ackerman :robot:
Browse files

99234723

parent fafe370e
No related branches found
No related tags found
No related merge requests found
......@@ -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)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment