numpy
的isnan
函数用于判断数据是否为NaN
。
import numpy as np
a = np.isnan(np.nan)
print("a =", a)
b = np.isnan([np.nan, 0, -1])
print("b =", b)
执行结果:
a = True
b = [ True False False]
标签:isnan,False,函数,nan,print,np,numpy
来源: https://blog.csdn.net/fukangwei_lite/article/details/122330857