View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0002486 | OpenFOAM | Bug | public | 2017-03-05 12:10 | 2017-04-20 11:03 |
Reporter | hertzsprung | Assigned To | will | ||
Priority | normal | Severity | minor | Reproducibility | always |
Status | resolved | Resolution | fixed | ||
Platform | GNU/Linux | OS | Ubuntu | OS Version | 16.10 |
Product Version | dev | ||||
Summary | 0002486: Singular value decomposition of singular matrix returns nans | ||||
Description | The attached application returns a psuedo-inverse that is all nans. The same operation in python3-numpy gives the expected result. | ||||
Tags | No tags attached. | ||||
|
|
|
Can you provide a patch to fix this problem? |
|
Here is some basic info about NumPy: https://www.everipedia.com/NumPy/ |
|
Your test program needs to construct the SVD class after setting the matrix coefficients. The decomposition is done on construction, not at the point of generating the pseudo-inverse. The bug report was still valid, though. I don't fully understand the SVD code, but I found a product that was under-flowing, which was later used in a division. I've added protection to these operations as of commit 646a269217d1558bb67386a8721c0ca5d50830c0. The matrix in your test routine now doesn't generate any NaNs, so I'm considering this bug resolved. The pseudo-inverse still isn't exactly the same as numpy or octave, though. I don't know whether that's a bug, or if it is to be expected for a matrix this badly conditioned. |
Date Modified | Username | Field | Change |
---|---|---|---|
2017-03-05 12:10 | hertzsprung | New Issue | |
2017-03-05 12:10 | hertzsprung | File Added: testSingularSVD.tar.gz | |
2017-03-05 12:32 | henry | Note Added: 0007854 | |
2017-04-08 00:41 | travm1 | Note Added: 0008022 | |
2017-04-20 11:03 | will | Assigned To | => will |
2017-04-20 11:03 | will | Status | new => resolved |
2017-04-20 11:03 | will | Resolution | open => fixed |
2017-04-20 11:03 | will | Note Added: 0008035 |