On Sat, Aug 13, 2022 at 12:25 AM Federico Fiorani <deferoci(a)gmail.com> wrote:
Hello everyone,
I found this strange behaviour of series as values in bundles. Script is
explanatory.
<hansl>
clear
set verbose off
nulldata 10
s1 = index % 2 ? 1 : NA
bundle b = null
b.s = s1
smpl 1 5 --permanent
print s1
eval b.s
series s2 = b.s
</hansl>
Thanks for the report, Federico. It's "correct" that the last line of
the script will fail ("Incompatible types in assignment: series =
matrix") since the 10 values saved as b.s cannot be interpreted as a
series after the dataset is shrunk. However "eval.bs" ought to
retrieve the original 10 values (1, NA, 1, NA, ...). That's now fixed
in git. The problem was specific to an "object that was formerly a
series" that contains missing values.
Allin