For the sake of clarity, please define a design matrix
design_matrix = np.ones((n_samples, 1), dtype=float)

Note that it is used twice