On Fri, 3 Aug 2018, Riccardo (Jack) Lucchetti wrote:
On Fri, 3 Aug 2018, Allin Cottrell wrote:
> On Fri, 3 Aug 2018, Riccardo (Jack) Lucchetti wrote:
>
>> On Fri, 3 Aug 2018, Sven Schreiber wrote:
>>
>>> Furthermore I wonder why the following functions couldn't also naturally
>>> return empty matrices when given an empty matrix as argument (but this is
>>> only for sake of consistency, not for a particular need):
>>
>> I committed to git a simple modification, so that the following now runs
>> ok:
>>
>> <hansl>
>> e = {}
>> loop foreach i ginv diag transp vec vech unvech cholesky upper lower sort\
>> dsort values mreverse
>> x = $i(e)
>> print x
>> endloop
>> </hansl>
>>
>> Allin, please review and feel free to scrap it if you don't like it.
>
> Sorry to be a spoilsport but I'd kinda rather not make this sort of change
> right now. Can we review it carefully after the (hopefully imminent!)
> release?
Fine by me!
Well, actually... Your changes looked a bit daunting since the diff
was quite large, but I think I've found a way to allow those functions
to work on empty matrices with only minimal change to geneval.c. And
I'm now confident there shouldn't be unwanted side-effects. (There
probably wouldn't have been unwanted side-effects anyway, but that's
clearer now.)
To inspect: compare [7a19ca] with [1b7a11] under History at
https://sourceforge.net/p/gretl/git/ci/master/tree/lib/src/geneval.c
Allin