qlib icon indicating copy to clipboard operation
qlib copied to clipboard

Ignorant use of "== np.nan" in qlib/data/filter.py

Open victor-zou opened this issue 1 month ago • 1 comments

🐛 Bug Description

To Reproduce

Remove it or change to np.isnan?

Screenshot

Image

victor-zou avatar Nov 03 '25 12:11 victor-zou

Hi @victor-zou ,

Thanks for pointing this out — the issue was indeed caused by using == np.nan, which never evaluates to True. We’ve adopted your suggestion and replaced it with np.isnan(...).

A PR has already been submitted to fix this bug. Really appreciate your careful review and helpful feedback!

SunsetWolf avatar Nov 14 '25 08:11 SunsetWolf