|
From: | Luis Mendo |
Subject: | [Octave-bug-tracker] [bug #51437] mean(zeros(1, 0)) does not return NaN for Matlab compatibility |
Date: | Mon, 24 Jul 2017 18:34:21 -0400 (EDT) |
User-agent: | Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/59.0.3071.115 Safari/537.36 |
Follow-up Comment #7, bug #51437 (project octave): It's not strange behaviour. 'mean' with 1 input applies along the first non-singleton dimension. 'mean (zeros (1,0))' averages along the second dim and so gives NaN. 'mean (zeros (2,0))' averages along the first and so gives zeros(1,0). Try using dimension as a second input to 'mean' _______________________________________________________ Reply to this item at: <http://savannah.gnu.org/bugs/?51437> _______________________________________________ Message sent via/by Savannah http://savannah.gnu.org/
[Prev in Thread] | Current Thread | [Next in Thread] |