Am 05.11.2024 um 01:12 schrieb Cottrell, Allin:
On Mon, Nov 4, 2024 at 6:39 PM Sven Schreiber
<sven.schreiber(a)fu-berlin.de> wrote:
What exactly caused you to struggle? It's expected behavior in gretl
that a 1 x 1 matrix "decays" to a scalar outside of "genr" unless
you
prevent that, but the idea is that a scalar ought to be usable as a 1
x 1 matrix if required. If you wanted to do something with b.hu that
was not allowed on account of it not being a matrix I think that would
be a bug. (Hmm, maybe trying for m[1,1]?)
I had added rowname(s) when the object
was still a matrix, and that was
lost. I noticed especially when I tried rnameget() on the bundle member
and got an error because it became a scalar in the meantime.
However, you can ensure that m (1 x 1) maintains its matrix type
inside a bundle:
matrix m = {0.5}
bundle b = _()
matrix b.hu = m
eval typename(b.hu) # matrix
Right, see my other message, that's the workaround I used in the end.
thanks
sven