Don't use `arange` like this. Figure out the length of the range first, pass that to `arange`, then multiply by `dt`. It's much more robust to rounding errors.
```python
nt = int(np.round(last_t / dt))
return dt * np.arange(0, nt)
```