Skip to content

Commit fab2d08

Browse files
Update linear_discriminant_analysis.py
1 parent cb63e80 commit fab2d08

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

machine_learning/linear_discriminant_analysis.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -249,16 +249,16 @@ def accuracy(actual_y: list, predicted_y: list) -> float:
249249
return (correct / len(actual_y)) * 100
250250

251251

252-
T = TypeVar("T")
252+
num = TypeVar("num")
253253

254254

255255
def valid_input(
256-
input_type: Callable[[object], T], # Usually float or int
256+
input_type: Callable[[object], num], # Usually float or int
257257
input_msg: str,
258258
err_msg: str,
259-
condition: Callable[[T], bool] = lambda _: True,
259+
condition: Callable[[num], bool] = lambda _: True,
260260
default: str | None = None,
261-
) -> T:
261+
) -> num:
262262
"""
263263
Ask for user value and validate that it fulfill a condition.
264264

0 commit comments

Comments
 (0)