I wonder if there's a way to do this without calculating `np.isfinite(d).all()` twice for each element.  Maybe something like:

```
finite_dl = [d for d in dl if np.isfinite(d).all()]
if len(finite_dl):
    dl = finite_dl
```