[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Octave-bug-tracker] [bug #53655] regression? "find(false)" was 0x0 now
From: |
Mike Miller |
Subject: |
[Octave-bug-tracker] [bug #53655] regression? "find(false)" was 0x0 now its 0x1 |
Date: |
Sun, 15 Apr 2018 17:49:17 -0400 (EDT) |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:59.0) Gecko/20100101 Firefox/59.0 |
Update of bug #53655 (project octave):
Status: Confirmed => Patch Submitted
_______________________________________________________
Follow-up Comment #2:
Yes, this regression is caused by the change for bug #53603.
At 6f1fde568e46, size(find(false)) is [0 0]. At 2f0c0c0652d5,
size(find(false)) is [0 1].
I made the following additional change
--- a/libinterp/corefcn/find.cc
+++ b/libinterp/corefcn/find.cc
@@ -446,7 +446,8 @@ b = sparse (i, j, v, sz(1), sz(2));
dim_vector dv = result.dims ();
- retval(0) = (dv.isvector () ? result : result.reshape (dv.as_column
()));
+ retval(0) = (dv.all_zero () || dv.isvector ()
+ ? result : result.reshape (dv.as_column ()));
}
else
{
and the regression is fixed.
I'll push this on stable later today if there are no objections and if it
still works after I update the stable branch and run the full test suite.
_______________________________________________________
Reply to this item at:
<http://savannah.gnu.org/bugs/?53655>
_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/