[Gretl-devel] argument type problem when 1x1 matrix is coerced to scalar
cottrell at wfu.edu
Thu Jul 16 13:04:45 EDT 2015
On Thu, 16 Jul 2015, Sven Schreiber wrote:
> while I was testing the SVAR addon I ran into a bug that has its roots in
> gretl. The code below shows the problem, namely that even though the function
> hey() officially returns a matrix, if it's a 1x1 matrix _and_ if the caller
> does not explicitly cast the output to a matrix type (with the 'matrix' alias
> for genr), then gretl puts the return value into a scalar type. And if the
> caller then wants to use this variable as a matrix (because that's what it's
> supposed to be), it fails.
> So I think gretl should honor the return type of a user-defined function
That sounds right to me. Another thing for next week's list (I'm
taking the next few days off).
More information about the Gretl-devel