On Thu, 27 Aug 2015, Sven Schreiber wrote:
according to the doc min/max/mean are not supposed to work with
matrices
(where I think we have debated in the past if this restriction could be
lifted, just like with sum(), but I don't remember the reasons for not doing
so...), but instead of yielding an error message they give wrong results:
<hansl>
scalar hey = min(I(2)) # gives 1
hey = max(I(2)) # gives 1, true by coincidence?
hey = max(mreverse(I(2))) # gives 0, so yes, a coincidence
hey = mean(I(2)) # gives 1
</hansl>
Ah, quite a subtle bug there, specific to the case where there's no
dataset in place, so that gretl_vector_get_length on a 2 x 2 matrix
returns a result that matches the length of the dataset (namely 0).
Now fixed in CVS and snapshots.
Allin