Lives in zipline.__init__ for doctests.

def teardown(self, np=np):
    """Lives in zipline.__init__ for doctests."""

    if self.old_err is not None:
        np.seterr(**self.old_err)

    if self.old_opts is not None:
        np.set_printoptions(**self.old_opts)