Am 11.06.2014 15:29, schrieb Riccardo (Jack) Lucchetti:
On Wed, 11 Jun 2014, Sven Schreiber wrote:
> Apart from that, the expression:
> "!sumc(m1 .= m2')"
> puzzles me a little. First because of the transpose in "(m1 .= m2')":
if
> it is equivalent to "((m1 .= m2)')" I would say I find the order of
> precedence surprising. If instead it's the same as "(m1 .= (m2'))"
then
> I guess I don't understand what the code does.
Ok, I admit that maybe I could have commented on it a little.
The idea is to use the "dot-equal" operator and compare a _column_
vector to a _row_ vector so to have a _matrix_ of results.
I have to think about whether I love or hate it, given that in
gretl/hansl a vector appears to be nothing than a special matrix and
therefore it is always clear whether it's a row or column (as opposed to
python-numpy for example, where people like to use 1-dim-arrays for
vectors, where the property row/column is undefined). But I guess this
can qualify as broadcasting behavior.
Then I would expect that (m1 .* m2') would also work (will test, have to
run now)...
cheers,
sven