MAINT: Simplify some uses of errstate context manager.

This changes, e.g.,

    with np.errstate():
        np.seterr(divide='ignore')
        ...

to

    with np.errstate(divide='ignore'):
        ...