[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Octave-bug-tracker] [bug #56232] Octave crash when inverting an empty s
From: |
Rik |
Subject: |
[Octave-bug-tracker] [bug #56232] Octave crash when inverting an empty sparse matrix. |
Date: |
Mon, 6 May 2019 20:11:03 -0400 (EDT) |
User-agent: |
Mozilla/5.0 (Windows NT 10.0; WOW64; Trident/7.0; rv:11.0) like Gecko |
Update of bug #56232 (project octave):
Status: Confirmed => Patch Submitted
_______________________________________________________
Follow-up Comment #15:
Attached is a patch which does what I suggested, using nullptr for r and d, if
the sparse matrix is empty. This actually doesn't have any performance impact
because the re-allocation code was being executed anyways.
This stops the crash, although the error is still
error: inv: sparse_lu: symbolic factorization failed
The second part of resolving this is to return a warning and some sort of
matrix as Matlab does.
For the full case, I get
octave:1> inv (zeros (2))
warning: matrix singular to machine precision
ans =
Inf Inf
Inf Inf
So that would be one possibility, to return a warning and the matrix
sparse (Inf (2))
Matlab returns
sparse ([Inf, NaN;
NaN, Inf])
but that is probably just an artifact of the implementation and needn't be
copied exactly unless we want to.
(file #46868)
_______________________________________________________
Additional Item Attachment:
File name: bug56232.cset Size:1 KB
<https://savannah.gnu.org/file/bug56232.cset?file_id=46868>
_______________________________________________________
Reply to this item at:
<https://savannah.gnu.org/bugs/?56232>
_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/
- [Octave-bug-tracker] [bug #56232] Octave crash when inverting an empty sparse matrix., Marco Caliari, 2019/05/01
- [Octave-bug-tracker] [bug #56232] Octave crash when inverting an empty sparse matrix., anonyme, 2019/05/06
- [Octave-bug-tracker] [bug #56232] Octave crash when inverting an empty sparse matrix., Marco Caliari, 2019/05/06
- [Octave-bug-tracker] [bug #56232] Octave crash when inverting an empty sparse matrix., Rik, 2019/05/06
- [Octave-bug-tracker] [bug #56232] Octave crash when inverting an empty sparse matrix., Marco Caliari, 2019/05/06
- [Octave-bug-tracker] [bug #56232] Octave crash when inverting an empty sparse matrix., Rik, 2019/05/06
- [Octave-bug-tracker] [bug #56232] Octave crash when inverting an empty sparse matrix., Rik, 2019/05/06
- [Octave-bug-tracker] [bug #56232] Octave crash when inverting an empty sparse matrix., Rik, 2019/05/06
- [Octave-bug-tracker] [bug #56232] Octave crash when inverting an empty sparse matrix.,
Rik <=
- [Octave-bug-tracker] [bug #56232] Octave crash when inverting an empty sparse matrix., Marco Caliari, 2019/05/07
- [Octave-bug-tracker] [bug #56232] Octave crash when inverting an empty sparse matrix., anonyme, 2019/05/07
- [Octave-bug-tracker] [bug #56232] Octave crash when inverting an empty sparse matrix., anonyme, 2019/05/07
- [Octave-bug-tracker] [bug #56232] Octave crash when inverting an empty sparse matrix., Marco Caliari, 2019/05/07
- [Octave-bug-tracker] [bug #56232] Octave crash when inverting an empty sparse matrix., anonyme, 2019/05/07
- [Octave-bug-tracker] [bug #56232] Octave crash when inverting an empty sparse matrix., anonyme, 2019/05/07
- [Octave-bug-tracker] [bug #56232] Octave crash when inverting an empty sparse matrix., anonyme, 2019/05/07
- [Octave-bug-tracker] [bug #56232] Octave crash when inverting an empty sparse matrix., Rik, 2019/05/07
- [Octave-bug-tracker] [bug #56232] Octave crash when inverting an empty sparse matrix., Rik, 2019/05/07
- [Octave-bug-tracker] [bug #56232] Octave crash when inverting an empty sparse matrix., Rik, 2019/05/07