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]
2023-11-14 20:48:10
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]