-
-
Notifications
You must be signed in to change notification settings - Fork 10.9k
TST: Fix various incorrect linalg tests #8369
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
Changes from all commits
Commits
Show all changes
12 commits
Select commit
Hold shift + click to select a range
6ceb8a4
TST: Correct empty square test case to actually be square
eric-wieser 761f8d5
TST: Add some non-square 0-shaped test-cases
eric-wieser eb753f8
TST: Correct pinv test case such that it doesn't fail correct cases
eric-wieser 21a5142
TST: Prevent non-square testcases being hidden by square ones (fix typo)
eric-wieser 6b60a27
TST: Enable testing pinv on non-square matrices
eric-wieser 340779f
TST: Adjust the precision of assert_almost_equal, but based on the type
eric-wieser c344206
TST: Refactor all the test case lists
eric-wieser b8f75f0
TST: Correct test cases to actually make sense
eric-wieser 8356530
BUG: prevent np.linalg.eig ValueError when given a 0x0 array
eric-wieser b28ea1c
BUG: Raise LinAlgError from lstsq rather than a math domain error fro…
eric-wieser 08aa95f
BUG: prevent np.linalg.eigh ValueError when given a 0x0 array
eric-wieser e6d81d9
fixup! TST: Refactor all the test case lists
eric-wieser File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
According to LAPACK, this should be:
For whatever reason, we seem to have decided that
log(2) = SMLSIZ = 1
, which seems best described as "false". Either way, this is a can of worms, and not one that I think this PR should be opening.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we open an issue about this? Is there some example for when this goes bad? (I really hate bugs that might silently create incorrect results, and if this is the case, we should give it some priority)
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have a patch in the works that uses lapack's internal mechanism to calculate this correctly. Unfortunately, there's a bug in the modified version of lapack bundled with numpy that makes this work. We'd need to regenerate the lapack c code from a newer-but-not-so-new-to-break-f2c release of lapack (#8376). The next step of fixing this is to actually get the generator running again ( #8381 ).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great, I have no idea of these things, was just worried this might be forgotten :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Guess it would do no harm to open an issue. My working tree was branching way too much for a bunch of problems discovered while trying to fix the problems, and I think the best call is to sit tight and wait for PR merge/rejection, rather than increasing the amount of rebases I need to do each time!