Skip to content

Commit 5a9e860

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

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

machine_learning/linear_discriminant_analysis.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -247,6 +247,7 @@ def accuracy(actual_y: list, predicted_y: list) -> float:
247247
# of all data and multiplied by 100
248248
return (correct / len(actual_y)) * 100
249249

250+
250251
def valid_input[num](
251252
input_type: Callable[[object], num], # Usually float or int
252253
input_msg: str,

searches/binary_search.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -226,7 +226,9 @@ def binary_search_by_recursion(
226226

227227
if sorted_collection[midpoint] == item:
228228
if midpoint > left:
229-
res = binary_search_by_recursion(sorted_collection, item, left, midpoint - 1)
229+
res = binary_search_by_recursion(
230+
sorted_collection, item, left, midpoint - 1
231+
)
230232
return res if res != -1 else midpoint
231233
return midpoint
232234
elif sorted_collection[midpoint] > item:
@@ -268,4 +270,5 @@ def exponential_search(sorted_collection: list[int], item: int) -> int:
268270

269271
if __name__ == "__main__":
270272
import doctest
271-
doctest.testmod()
273+
274+
doctest.testmod()

0 commit comments

Comments
 (0)