Skip to content

TYP: fix swapped linalg.slogdet dtypes of sign/logabsdet - #31882

Merged
charris merged 1 commit into
numpy:mainfrom
jorenham:typing/linalg.slogdet-swap
Jul 6, 2026
Merged

charris merged 1 commit into
numpy:mainfrom
jorenham:typing/linalg.slogdet-swap

Conversation

@jorenham

@jorenham jorenham commented Jul 6, 2026

Copy link
Copy Markdown
Member

In short: linalg.slogdet(...).sign can be complex and logabsdet can only be real, but it was the other way around in the stubs.


Fully written by me (a human, I think); bug found by Claude Fable 5 (high) (here's the full audit for those interested).

@charris
charris merged commit fcf70a9 into numpy:main Jul 6, 2026
14 checks passed
@charris

charris commented Jul 6, 2026

Copy link
Copy Markdown
Member

Thanks Joren.

@jorenham
jorenham deleted the typing/linalg.slogdet-swap branch July 6, 2026 21:28
@charris charris removed the 09 - Backport-Candidate PRs tagged should be backported label Jul 6, 2026
MaanasArora pushed a commit to MaanasArora/numpy that referenced this pull request Jul 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants