You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Due to changes proposed in #10404, it seems that check_array as currently a main limitation. force_all_finite will force both NaN and infto be rejected. If preprocessing methods (whenever this is possible) should let pass NaN, this argument is not enough permissive.
Before to implement anything, I think it could be good to have some feedback on the way to go. I see the following solutions:
force_all_finite could still accept a bool to preserve the behaviour. Additionally, it could accept an str to filter only inf.
make a private function _assert_finite_or_nan (similarly to this proposal removing the numpy version checking) in the data.py which can be shared between the preprocessing methods.
Due to changes proposed in #10404, it seems that
check_arrayas currently a main limitation.force_all_finitewill force bothNaNandinfto be rejected. If preprocessing methods (whenever this is possible) should let passNaN, this argument is not enough permissive.Before to implement anything, I think it could be good to have some feedback on the way to go. I see the following solutions:
force_all_finitecould still accept a bool to preserve the behaviour. Additionally, it could accept anstrto filter onlyinf.allow_nan. @amueller was worried that it makescheck_arrayto complex._assert_finite_or_nan(similarly to this proposal removing the numpy version checking) in thedata.pywhich can be shared between the preprocessing methods.They are the solutions that I have in mind for the moment but anything else is welcomed.
@jnothman @agramfort @amueller @lesteve @ogrisel @GaelVaroquaux I would be grateful for any insight.