Skip to content

BUG: np.cov transpose control#27661

Merged
seberg merged 1 commit intonumpy:mainfrom
tylerjereddy:treddy_issue_27658
Oct 29, 2024
Merged

BUG: np.cov transpose control#27661
seberg merged 1 commit intonumpy:mainfrom
tylerjereddy:treddy_issue_27658

Conversation

@tylerjereddy
Copy link
Copy Markdown
Contributor

Copy link
Copy Markdown
Contributor

@jakevdp jakevdp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good - thanks!

@seberg
Copy link
Copy Markdown
Member

seberg commented Oct 29, 2024

Does this have a chance of breaking existing (bad) code in odd ways? (I.e. should we add a release note and consider probably not backport?)

@jakevdp
Copy link
Copy Markdown
Contributor

jakevdp commented Oct 29, 2024

The bug has existed for 19 years (I tracked the behavior to 959f36c via git blame) so probably no backport is necessary. We should treat it as a behavior change rather than a typical bug fix.

@ngoldbaum
Copy link
Copy Markdown
Member

I agree, let's add a release note and then merge this.

@ngoldbaum ngoldbaum added the 56 - Needs Release Note. Needs an entry in doc/release/upcoming_changes label Oct 29, 2024
* Fixes numpy#27658

* Use a more sensible filter for controlling
the decision to transpose the design matrix
received by `np.cov`.

* Add a release note.
@tylerjereddy
Copy link
Copy Markdown
Contributor Author

Ok, I added a release note/towncrier fragment (amending the original commit since the diff is so small here).

The release note looks like this locally via spin docs:

image

@seberg
Copy link
Copy Markdown
Member

seberg commented Oct 29, 2024

Thanks Tyler and Jake!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

00 - Bug 56 - Needs Release Note. Needs an entry in doc/release/upcoming_changes component: numpy.lib

Projects

None yet

Development

Successfully merging this pull request may close these issues.

BUG: np.cov with rowvar=False returns the wrong shape for N=1

4 participants