[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Octave-bug-tracker] [bug #51333] Reductions on an empty matrix is incon
From: |
Kai Torben Ohlhus |
Subject: |
[Octave-bug-tracker] [bug #51333] Reductions on an empty matrix is inconsistent |
Date: |
Thu, 29 Jun 2017 18:24:56 -0400 (EDT) |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/58.0.3029.81 Safari/537.36 |
Update of bug #51333 (project octave):
Status: None => Confirmed
Release: 4.2.1 => dev
_______________________________________________________
Follow-up Comment #1:
Applies for the development version as well.
Digging into the code of "sum", "xsum", "prod", "sumsq" of an double NDArray,
I found the inline function "do_mx_red_op" to be called in any case. According
to a comment
https://hg.savannah.gnu.org/hgweb/octave/file/tip/liboctave/operators/mx-inlines.cc#l1537
// M*b inconsistency: sum ([]) = 0 etc.
it has to do with the described problem.
For "dot" the situation might be easier, as it is a seperate file which could
check for empty input values:
https://hg.savannah.gnu.org/hgweb/octave/file/tip/libinterp/corefcn/dot.cc#l67
_______________________________________________________
Reply to this item at:
<http://savannah.gnu.org/bugs/?51333>
_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/