Memory issues with creating simple regression model

I think this is some broadcast error - when you have data_y.values.shape = (300000,) Y_obs actually being broadcasted to (300000, 300000) which cause the memory error.