[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Octave-bug-tracker] [bug #55264] mean([]) throws division-by-zero warni
From: |
Rik |
Subject: |
[Octave-bug-tracker] [bug #55264] mean([]) throws division-by-zero warning |
Date: |
Fri, 21 Dec 2018 16:30:02 -0500 (EST) |
User-agent: |
Mozilla/5.0 (Windows NT 10.0; WOW64; Trident/7.0; rv:11.0) like Gecko |
Update of bug #55264 (project octave):
Status: None => Confirmed
Summary: mean([]) throws incompatible warning => mean([])
throws division-by-zero warning
_______________________________________________________
Follow-up Comment #3:
The decision has already been made to remove the division-by-zero warning, so
there is no controversy. However, it's certainly not going to be a part of
version 5.0.
I think it would be okay to add a special case, temporarily. Make sure it is
well marked with a FIXME note to remove it as soon as bug #46650 is cleared.
Also, take care to preserve both the class and size of the input in the
eventual output NaN. As it exists today, for example.
octave:3> mean (single ([]))
warning: division by zero
warning: called from
mean at line 149 column 9
ans = NaN
octave:4> class (ans)
ans = single
octave:5> mean (zeros (1,3,0,5))
ans = [](1x1x0x5)
octave:6> mean (zeros (1,0,2), 2)
warning: division by zero
warning: called from
mean at line 149 column 9
ans =
ans(:,:,1) = NaN
ans(:,:,2) = NaN
_______________________________________________________
Reply to this item at:
<https://savannah.gnu.org/bugs/?55264>
_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/