identifying floats in this manner is also dangerous and with the intermixing of `numpy` types and python types it's really challenging.  What I have been using to check if something is a float type:

```python
import numpy as np

def is_float(val):
    if isinstance(val,float): return True
    if isinstance(val, np.number) and val.dtype.char in 'efdg': return True
    return False
```