BUG: Out-of-memory for matrices
by Artur T.
Dear all,
I've expected the following error using latest git on Ubuntu linux when
trying to update a matrix in a matrices object by referencing to itself
(updating itself). This works fine with a matrix object but not with a
matrix within a matrices object.
<hansl>
matrix m = mnormal(10,2)
matrices Mtmp = defarray(m[,1], m[,2]) # define temp. matrices
matrices M = array(nelem(Mtmp)) # matrices of interest
# update each matrix in matrices M
loop j=1..nelem(Mtmp) -q
M[j] ~= Mtmp[j] # grab last version of j-th matrix in ret
M[j] = M[j] # update j-th matrix in ret # results in ERROR
endloop
</hansl>
Best,
Artur
5 years, 11 months
The mysterious stack() function
by Sven Schreiber
Hi,
a colleague made me notice the stack() function for handling a specific
case of panel data import in section 4.5 of the guide. I must admit I
have never been aware of that function, and I have one or two questions
here.
First, it does not appear in the function index (Gretl Command Reference
/ Functions proper, or in the built-in function documentation). Is this
an oversight, or is there a deeper reason?
Secondly, it is well documented in the guide section 4.5, but it appears
to be a strange beast: It is not a gretl command (gets function
arguments in parentheses, for example), but there are double-dash
options such as --offset or --length. I don't remember to have seen
something like this in gretl (or hansl) before.
I guess the story here is some path dependence of the early days, but I
wonder if this area could be cleaned up somehow?
thanks,
sven
5 years, 11 months
Re: [Gretl-devel] [Gretl-users] Problem with Add Random Variable menu command
by Riccardo (Jack) Lucchetti
On Thu, 10 Jan 2019, Sven Schreiber wrote:
> Am 10.01.2019 um 17:20 schrieb Riccardo (Jack) Lucchetti:
>> On Wed, 9 Jan 2019, Artur T. wrote:
>
>>>> Am 09.01.19 um 21:39 schrieb Alecos Papadopoulos:
>>>>> I have version 2018d Windows 64-bit.
>>>>>
>>>>> I try to generate random numbers using the "Random variable..." command
>>>>> in the Add menu and I get
>>>>>
>>>>> <<'U1' -- no numeric conversion performed!>>
>
>>>
>>> I can confirm this using current git (2019a) on ubuntu linux.
>>
>> This should be now fixed in git.
>
> Good, I tend to think it's a pretty severe bug, for example for teaching
> purposes...
[I'm moving this to gretl-devel because it's fairly technical, but IMO
wotrh reading for people who like to see what's going on in the C sources]
In fact, it was pretty subtle: the C construct that was causing trouble
was
na(x[j++])
and you would think: "OK, this evaluates if x[j] is missing, and then
moves on"; not quite. In fact, na(x) has become (after the big NADBL
reoganisation) a macro in which TWO calls are performed, so j would go
straight from 0 to 2. I performed a search for similar construct in the
whole source tree and fortunately there seem to be no more instances.
-------------------------------------------------------
Riccardo (Jack) Lucchetti
Dipartimento di Scienze Economiche e Sociali (DiSES)
Università Politecnica delle Marche
(formerly known as Università di Ancona)
r.lucchetti(a)univpm.it
http://www2.econ.univpm.it/servizi/hpp/lucchetti
-------------------------------------------------------
5 years, 11 months