Skip to content

Commit

Permalink
Apply new formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
mhostetter committed Jan 21, 2025
1 parent f533718 commit 185b331
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
12 changes: 6 additions & 6 deletions scripts/create_prime_factors_database.py
Original file line number Diff line number Diff line change
Expand Up @@ -364,9 +364,9 @@ def parse_factors_string(table: dict, rows: dict, row: dict, string: str, letter
# A special composite. Verify that it divides the remaining value.
label = prime_composite_label(table, row["n"], letter)
key = (label, factor)
assert (
row["composite"] % table["composites"][key] == 0
), f"{row['composite']} is not divisible by {table['composites'][key]}"
assert row["composite"] % table["composites"][key] == 0, (
f"{row['composite']} is not divisible by {table['composites'][key]}"
)
else:
# Must be a regular integer
factor = int(factor)
Expand Down Expand Up @@ -499,9 +499,9 @@ def create_even_negative_offset_table(conn: sqlite3.Connection, cursor: sqlite3.

row = select_two_factorizations_from_database(cursor, A_value, B_value)
if row is None:
assert (
k == k_fail
), f"The {base}^(2k) - 1 table generation failed at k = {k}, but should have failed at k = {k_fail}"
assert k == k_fail, (
f"The {base}^(2k) - 1 table generation failed at k = {k}, but should have failed at k = {k_fail}"
)
break

exponent = 2 * k
Expand Down
2 changes: 1 addition & 1 deletion scripts/sparse_poly_performance_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ def get_coeffs(degree, N, field):
N = 3 # Number of non-zero coefficients
degree = 100
while degree <= 1000:
print(f"Nonzero: {N} / {degree}, {N/degree*100} %")
print(f"Nonzero: {N} / {degree}, {N / degree * 100} %")
p1 = galois.Poly.Degrees(*get_coeffs(degree, N, GF))
p2 = galois.Poly.Degrees(*get_coeffs(degree, N, GF))

Expand Down

0 comments on commit 185b331

Please sign in to comment.