如何檢查python中的值是否爲nan?

float(‘nan’)是Nan不是一個數字,我該如何判斷一個值爲nan,有什麼簡單的方法麼?web 使用math.isnan()來進行判斷svg >>> import math >>> x=float('nan') >>> math.isnan(x) True
相關文章
相關標籤/搜索