Skip to content

Commit 4cf6dbf

Browse files
[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
1 parent eb16b2d commit 4cf6dbf

File tree

4 files changed

+6
-12
lines changed

4 files changed

+6
-12
lines changed

digital_image_processing/filters/gabor_filter.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -48,9 +48,9 @@ def gabor_filter_kernel(
4848
_y = -sin_theta * px + cos_theta * py
4949

5050
# fill kernel
51-
gabor[y, x] = np.exp(
52-
-(_x**2 + gamma**2 * _y**2) / (2 * sigma**2)
53-
) * np.cos(2 * np.pi * _x / lambd + psi)
51+
gabor[y, x] = np.exp(-(_x**2 + gamma**2 * _y**2) / (2 * sigma**2)) * np.cos(
52+
2 * np.pi * _x / lambd + psi
53+
)
5454

5555
return gabor
5656

machine_learning/frequent_pattern_growth.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -240,9 +240,7 @@ def ascend_tree(leaf_node: TreeNode, prefix_path: list[str]) -> None:
240240
ascend_tree(leaf_node.parent, prefix_path)
241241

242242

243-
def find_prefix_path(
244-
base_pat: frozenset, tree_node: TreeNode | None
245-
) -> dict: # noqa: ARG001
243+
def find_prefix_path(base_pat: frozenset, tree_node: TreeNode | None) -> dict: # noqa: ARG001
246244
"""
247245
Find the conditional pattern base for a given base pattern.
248246

sorts/bead_sort.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,7 @@ def bead_sort(sequence: list) -> list:
3131
if any(not isinstance(x, int) or x < 0 for x in sequence):
3232
raise TypeError("Sequence must be list of non-negative integers")
3333
for _ in range(len(sequence)):
34-
for i, (rod_upper, rod_lower) in enumerate(
35-
zip(sequence, sequence[1:])
36-
): # noqa: RUF007
34+
for i, (rod_upper, rod_lower) in enumerate(zip(sequence, sequence[1:])): # noqa: RUF007
3735
if rod_upper > rod_lower:
3836
sequence[i] -= rod_upper - rod_lower
3937
sequence[i + 1] += rod_upper - rod_lower

strings/min_cost_string_conversion.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -132,9 +132,7 @@ def assemble_transformation(ops: list[list[str]], i: int, j: int) -> list[str]:
132132
elif op[0] == "R":
133133
string[i] = op[2]
134134

135-
file.write(
136-
"%-16s" % ("Replace %c" % op[1] + " with " + str(op[2]))
137-
) # noqa: UP031
135+
file.write("%-16s" % ("Replace %c" % op[1] + " with " + str(op[2]))) # noqa: UP031
138136
file.write("\t\t" + "".join(string))
139137
file.write("\r\n")
140138

0 commit comments

Comments
 (0)