code: def zip(value=data, mu=mu, psi=psi):
      
  
      # Initialize likeihood
      like = 0.0
  
      # Loop over data
      for x in value:
  
          if not x:
              # Zero values
              like += np.log((1. - psi) + psi * np.exp(-mu))
  
          else:
              # Non-zero values
              like += np.log(psi) + poisson_like(x, mu)
  
      return like
docs: Zero-inflated Poisson likelihood