其他分享
首页 > 其他分享> > numpy_isnan函数

numpy_isnan函数

作者:互联网

  numpyisnan函数用于判断数据是否为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