Skip to content

Update slogdet guidance for when the determinant is zero #303

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Nov 4, 2021

Conversation

kgryte
Copy link
Contributor

@kgryte kgryte commented Nov 4, 2021

This PR

  • updates the guidance in linalg.slogdet for when the determinant is zero. The original language stemmed from NumPy; however, the guidance there is more conceptual than grounded in practice due to errors in numerical precision (see BUG: slogdet does not return -inf when det returns 0 numpy/numpy#20114). Accordingly, this PR loosens restrictions around return values when the determinant is 0. Namely, the result should be sign 0 and logabsdet -inf, but may not be due to numerical precision errors.

@kgryte kgryte added Maintenance Bug fix, typo fix, or general maintenance. topic: Linear Algebra Linear algebra. labels Nov 4, 2021
@kgryte kgryte added this to the v2021 milestone Nov 4, 2021
@kgryte kgryte requested a review from asmeurer November 4, 2021 01:38
@kgryte kgryte removed the request for review from asmeurer November 4, 2021 02:16
@kgryte
Copy link
Contributor Author

kgryte commented Nov 4, 2021

Thanks @leofang! 😅

@kgryte kgryte merged commit 8768cbb into main Nov 4, 2021
@kgryte kgryte deleted the slogdet-edgecase branch November 4, 2021 02:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Maintenance Bug fix, typo fix, or general maintenance. topic: Linear Algebra Linear algebra.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants