Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def __init__(self, y, X, family=family.Gaussian(), offset=None, y_fix = None,
constant=True):
"""
Initialize class
"""
self.n = USER.check_arrays(y, X)
USER.check_y(y, self.n)
self.y = y
if constant:
self.X = USER.check_constant(X)
else:
self.X = X
self.family = family
self.k = self.X.shape[1]
if offset is None:
self.offset = np.ones(shape=(self.n,1))
else:
self.offset = offset * 1.0
if y_fix is None:
self.y_fix = np.zeros(shape=(self.n,1))
else:
self.y_fix = y_fix