Skip to content

Commit d631b44

Browse files
authored
fix(filter): replace invalid with in SeriesDFilter (#2051)
1 parent 0826879 commit d631b44

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

qlib/data/filter.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,7 @@ def _toTimestamp(self, timestamp_series):
168168
for _ts, _bool in timestamp_series.items():
169169
# there is likely to be NAN when the filter series don't have the
170170
# bool value, so we just change the NAN into False
171-
if _bool == np.nan:
171+
if np.isnan(_bool):
172172
_bool = False
173173
if _lbool is None:
174174
_cur_start = _ts

0 commit comments

Comments
 (0)