add type hinting
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
Torma Kristóf 2020-09-11 03:00:39 +02:00
parent 524aedabd5
commit d580e9f91a
Signed by: tormakris
GPG Key ID: DC83C4F2C41B1047

View File

@ -1,10 +1,14 @@
# Y8O353, E0HJQL # Y8O353, E0HJQL
import numpy as np def avg(ls: list) -> int:
if len(ls) != 0:
return sum(ls) / len(ls)
else:
return 0
def decision(h1, h2): def decision(h1: list, h2: list) -> int:
if 1 in h2[:4]: if avg(h2[:4]) >= 0.05:
return 1 return 1
else: else:
return 0 return 0