this should be

```Python
longflux = np.array(longflux, dtype=np.float64)
```
which will convert it to a float if the input is not a float or error if that is not possible.