[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: |
Joel Dahne |
Subject: |
[Octave-bug-tracker] [bug #51333] Reductions on an empty matrix is inconsistent |
Date: |
Fri, 30 Jun 2017 03:33:38 -0400 (EDT) |
User-agent: |
Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:54.0) Gecko/20100101 Firefox/54.0 |
Follow-up Comment #2, bug #51333 (project octave):
Yes, that's what I found as well. This means that if we would choose to go
with Matlabs version it is just a matter of adding a check for "dim < 0" in
the following if-statement.
For "dot" we add, right after the definition of dimx and dimy,
// Inconsistency: dot ([], []) = 0
if (dimx.ndims () == 2 && dimx(0) == 0 && dimx(1) == 0 &&
dimy.ndims () == 2 && dimy(0) == 0 && dimy(1) == 0)
{
dimx(1) = 1;
dimy(1) = 1;
}
if we go with the version Octave has now. If we choose the matlab version we
also add "nargin == 2" to the condition.
I don't know if we should go with the Matlab version, but either way I think
it makes sense to do the changes to "dot".
_______________________________________________________
Reply to this item at:
<http://savannah.gnu.org/bugs/?51333>
_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/