Skip to content

BUG/CLN: remove dead assignment to cov_p in GLM fit - #9826

Merged
bashtage merged 1 commit into
statsmodels:mainfrom
EdenRochmanSharabi:fix/glm-cov-p-dead-code-9776
Jun 8, 2026
Merged

bashtage merged 1 commit into
statsmodels:mainfrom
EdenRochmanSharabi:fix/glm-cov-p-dead-code-9776

Conversation

@EdenRochmanSharabi

Copy link
Copy Markdown
Contributor

The initial assignment to cov_p from rslt.normalized_cov_params (lines 1373-1376) is always overwritten by the hessian-based computation in the try/except block that immediately follows. The first assignment is never read before being replaced.

This removes the redundant assignment, resolving the code scanning alert.

Closes #9776

The initial assignment to cov_p from rslt.normalized_cov_params was
always overwritten by the hessian-based computation in the try/except
block that follows. Remove the redundant assignment.

Closes statsmodels#9776
@bashtage

bashtage commented Jun 8, 2026

Copy link
Copy Markdown
Member

LGTM. Thanks.

@bashtage
bashtage merged commit 011cf86 into statsmodels:main Jun 8, 2026
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

BUG/CLN unused assignment of cov_p in GLM fit

2 participants