Python: GLM regression working