1
0
mirror of https://github.com/microsoft/qlib.git synced 2026-06-06 05:51:17 +08:00

fix(filter): replace invalid with in SeriesDFilter (#2051)

This commit is contained in:
Linlang
2025-11-18 11:36:56 +08:00
committed by GitHub
parent 0826879481
commit d631b4450b

View File

@@ -168,7 +168,7 @@ class SeriesDFilter(BaseDFilter):
for _ts, _bool in timestamp_series.items():
# there is likely to be NAN when the filter series don't have the
# bool value, so we just change the NAN into False
if _bool == np.nan:
if np.isnan(_bool):
_bool = False
if _lbool is None:
_cur_start = _ts