def __init__(self, endog, exog, exog_infl=None, offset=None, inflation='logit', exposure=None, missing='none', **kwargs):
    super(GenericZeroInflated, self).__init__(endog, exog, offset=offset, exposure=exposure, missing=missing, **kwargs)
    if (exog_infl is None):
        self.k_inflate = 1
        self._no_exog_infl = True
        self.exog_infl = np.ones((endog.size, self.k_inflate), dtype=np.float64)
    else:
        self.exog_infl = exog_infl
        self.k_inflate = exog_infl.shape[1]
        self._no_exog_infl = False
    if (len(exog.shape) == 1):
        self.k_exog = 1
    else:
        self.k_exog = exog.shape[1]
    self.infl = inflation
    if (inflation == 'logit'):
        self.model_infl = Logit(np.zeros(self.exog_infl.shape[0]), self.exog_infl)
        self._hessian_inflate = self._hessian_logit
    elif (inflation == 'probit'):
        self.model_infl = Probit(np.zeros(self.exog_infl.shape[0]), self.exog_infl)
        self._hessian_inflate = self._hessian_probit
    else:
        raise ValueError(('inflation == %s, which is not handled' % inflation))
    self.inflation = inflation
    self.k_extra = self.k_inflate
    if (len(self.exog) != len(self.exog_infl)):
        raise ValueError('exog and exog_infl have different number ofobservation. `missing` handling is not supported')
    infl_names = [('inflate_%s' % i) for i in self.model_infl.data.param_names]
    self.exog_names[:] = (infl_names + list(self.exog_names))
    self.exog_infl = np.asarray(self.exog_infl, dtype=np.float64)
    self._init_keys.extend(['exog_infl', 'inflation'])
    self._null_drop_keys = ['exog_infl']
def __init__(self, endog, exog, exog_infl=None, offset=None, inflation='logit', exposure=None, missing='none', **kwargs):
    super(GenericZeroInflated, self).__init__(endog, exog, offset=offset, exposure=exposure, missing=missing, **kwargs)
    if (exog_infl is None):
        self.k_inflate = 1
        self._no_exog_infl = True
        self.exog_infl = np.ones((endog.size, self.k_inflate), dtype=np.float64)
    else:
        self.exog_infl = exog_infl
        self.k_inflate = exog_infl.shape[1]
        self._no_exog_infl = False
    if (len(exog.shape) == 1):
        self.k_exog = 1
    else:
        self.k_exog = exog.shape[1]
    self.infl = inflation
    if (inflation == 'logit'):
        self.model_infl = Logit(np.zeros(self.exog_infl.shape[0]), self.exog_infl)
        self._hessian_inflate = self._hessian_logit
    elif (inflation == 'probit'):
        self.model_infl = Probit(np.zeros(self.exog_infl.shape[0]), self.exog_infl)
        self._hessian_inflate = self._hessian_probit
    else:
        raise ValueError(('inflation == %s, which is not handled' % inflation))
    self.inflation = inflation
    self.k_extra = self.k_inflate
    if (len(self.exog) != len(self.exog_infl)):
        raise ValueError('exog and exog_infl have different number ofobservation. `missing` handling is not supported')
    infl_names = [('inflate_%s' % i) for i in self.model_infl.data.param_names]
    self.exog_names[:] = (infl_names + list(self.exog_names))
    self.exog_infl = np.asarray(self.exog_infl, dtype=np.float64)
    self._init_keys.extend(['exog_infl', 'inflation'])
    self._null_drop_keys = ['exog_infl']