Hi folks,
using latest git under Ubuntu yields a weird error with a loop. The
following definitely used to work in the past but fails now with an
"Data error".
The function get_dynamical_features() simply constructs a list of lags
of some series. I call the function within a loop three times. At the
second iteration it fails (see error message below).
<hansl>
clear
set verbose off
function list get_dynamical_features (const list Dataset,
const bundle Config)
series dx = Dataset.dx
list L = dx(0 to -Config.LAG_LENGTH)
return L
end function
nulldata 10
loop i=1..3
print i
series dx = normal()
bundle B = _(LAG_LENGTH = 2)
list R = get_dynamical_features(dataset, B) # breaks at 2nd iteration
R
endloop
</hansl>
with the error:
<error>
gretl version 2023c-git
Current session: 2023-07-26 14:56
? clear
i = 1.0000000
dx dx_1 dx_2
i = 2.0000000
Data error
*** error in function get_dynamical_features, line 1
series dx = Dataset.dx
> list R = get_dynamical_features(dataset, B)
</error>
Any idea what's going on here?
Best
Artur