def test_array(self): with self.assertRaises(TypeError): util.is_float(np.ones(3))
def test_none(self): with self.assertRaises(TypeError): util.is_float(None)
def test_string_not_numeric(self): self.assertFalse(util.is_float("abc"))
def test_string_none(self): self.assertFalse(util.is_float("None"))
def test_string_complex(self): self.assertFalse(util.is_float("12 + 1j"))
def test_string_int(self): self.assertTrue(util.is_float("12"))