From f477d633c10a645201f5681112e28ea5041cd507 Mon Sep 17 00:00:00 2001 From: Linlang Date: Fri, 14 Nov 2025 16:35:25 +0800 Subject: [PATCH] fix(filter): replace invalid with in SeriesDFilter --- qlib/data/filter.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/qlib/data/filter.py b/qlib/data/filter.py index 5057e20a4b6..246d6baf765 100644 --- a/qlib/data/filter.py +++ b/qlib/data/filter.py @@ -168,7 +168,7 @@ def _toTimestamp(self, timestamp_series): 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