code: def setup(self,
            np=np,
            numpy_version=numpy_version,
            StrictVersion=StrictVersion,
            new_pandas=new_pandas):
      
  
      if numpy_version >= StrictVersion('1.14'):
          self.old_opts = np.get_printoptions()
          np.set_printoptions(legacy='1.13')
      else:
          self.old_opts = None
  
      if new_pandas:
          self.old_err = np.geterr()
          # old pandas has numpy compat that sets this
          np.seterr(all='ignore')
      else:
          self.old_err = None
docs: Lives in zipline.__init__ for doctests.