def f(y):
    if ((y.ndim == 2) and (y.shape[1] == 1)):
        y = y[:, 0]
    sf = self.score_factor(params, endog=y)
    return np.column_stack(sf)
def f(y):
    if ((y.ndim == 2) and (y.shape[1] == 1)):
        y = y[:, 0]
    sf = self.score_factor(params, endog=y)
    return np.column_stack(sf)