What might be the cause of 'invalid value encountered in less_equal' in numpy

前端 未结 5 1139
陌清茗
陌清茗 2020-12-09 07:27

I experienced a RuntimeWarning

 RuntimeWarning: invalid value encountered in less_equal

Generated by this line of code of mine:

         


        
5条回答
  •  天命终不由人
    2020-12-09 08:09

    This happens due to Nan values in dataframe, which is completely fine with DF.

    In Pycharm, This worked like a charm for me:

    import warnings
    
    warnings.simplefilter(action = "ignore", category = RuntimeWarning)
    

提交回复
热议问题