示例#1
0
 def test_non_numeric(self):
     assert utils.safe_is_nan("some string") == False
示例#2
0
 def test_string(self):
     assert utils.safe_is_nan("nan") == False
示例#3
0
 def test_none(self):
     assert utils.safe_is_nan(None) == False
示例#4
0
 def test_int(self):
     assert utils.safe_is_nan(-99999) == False
示例#5
0
 def test_float(self):
     assert utils.safe_is_nan(12.5) == False
示例#6
0
 def test_python_nan(self):
     assert utils.safe_is_nan(float("nan")) == True
示例#7
0
 def test_numpy_nan(self):
     assert utils.safe_is_nan(np.nan) == True