`nan` and `floor` are not used in this file anyway.

I caution about using the `numpy` version of floor if the input is not meant to take array or array-like values.  There is significant overhead associated with the `numpy` version relative to the `math` version, which is relevant if the routine is used a significant number of times.   Also, `numpy.floor()` returns a value with a numpy dtype, which behaves like a scalar but can have overhead.  Not saying this is an issue here, but just a word of caution.