A question came up lately regarding addition (or subtraction) of an
m x n matrix and a 1 x 1 matrix. The manual said that this was
permitted (with the 1 x 1 matrix being treated as a scalar, and
added to each element of the m x n one). But in fact it was
supported only if the m x n matrix was on the left; and I responded
to the report by enabling the case where the 1 x 1 matrix is on the
left.
But I wonder... is this really a good idea? We have the "dot
operators", ".+" and friends, which are suitable for this purpose,
and I'm concerned that allowing plain '+' and '-' for
non-conformable operands may mask scripting errors.
I ran into this myself the other day: I got the dimensions of a
certain matrix wrong but didn't notice the problem at first, since a
subtraction that, in a sense, "should have" generated an error went
through apparently OK, producing a nonsense result.
Maybe we shouldn't change this for gretl 1.9.6, but my feeling is
that we probably ought to be more rigorous in insisting on use of
the dot operators where they are the right tool for the job.
Allin