1
0
mirror of https://github.com/microsoft/qlib.git synced 2026-07-07 04:50:56 +08:00

Update sample.py

This commit is contained in:
you-n-g
2021-05-19 15:06:47 +08:00
committed by GitHub
parent dda509da0b
commit 26d75b71b0

View File

@@ -35,7 +35,7 @@ def parse_freq(freq: str) -> Tuple[int, str]:
raise ValueError(
"freq format is not supported, the freq should be like (n)month/mon, (n)week/w, (n)day/d, (n)minute/min"
)
_count = int(match_obj.group(1) if match_obj.group(1) else "1")
_count = int(match_obj.group(1)) if match_obj.group(1) is None else 1
_freq = match_obj.group(2)
_freq_format_dict = {
"month": "month",