更新 function.py
Gitea Actions Experiment Test / Experiment-Actions (push) Successful in 12s

This commit is contained in:
cy
2024-10-24 17:10:36 +08:00
parent 0b0c7613c2
commit 64ee170c18
+1 -1
View File
@@ -82,7 +82,7 @@ def load_data(filepath):
lines = f.readlines() lines = f.readlines()
for line in lines: for line in lines:
line = line.strip().split() line = line.strip().split()
if len(line) >= 1 and line[-1].isdigit(): if '?' not in line:
line_data = [1] + [0 if x == '?' else float(x) for x in [line[i] for i in range(len(line) - 1) if i not in [2, 23, 24, 25, 26, 27]]] line_data = [1] + [0 if x == '?' else float(x) for x in [line[i] for i in range(len(line) - 1) if i not in [2, 23, 24, 25, 26, 27]]]
target = int(line[22]) target = int(line[22])
if target in [2, 3]: if target in [2, 3]: