How to Check list containing NaN

前端 未结 3 1554
余生分开走
余生分开走 2021-02-19 19:51

In my for loop, my code generates a list like this one:

list([0.0,0.0]/sum([0.0,0.0]))

The loop generates all sort of other number vectors but

3条回答
  •  傲寒
    傲寒 (楼主)
    2021-02-19 19:52

    May be this is what you are looking for...

    a = [2,3,np.nan]
    b = True if True in np.isnan(np.array(a)) else False
    print(b)
    

提交回复
热议问题