float(‘nan’)是Nan不是一个数字,我该如何判断一个值为nan,有什么简单的方法么?web
使用math.isnan()来进行判断svg
>>> import math >>> x=float('nan') >>> math.isnan(x) True