[Rd] zero-extent matrices (PR#958)
Wed, 30 May 2001 12:36:56 -0700 (PDT)
On 30 May 2001, Peter Dalgaard BSA wrote:
> email@example.com writes:
> > In 1.2.3
> > matrix(nrow=10,ncol=0)%*%numeric(0)
> > returns a 10x1 matrix of 0s
> > In todays 1.3 it returns a 10x1 matrix of miscellaneous junk.
> > While both are probably wrong the latter is causing problems for survival.
> Acutally, I'd say that the 1.2.3 version is correct (sums over empty
> sets being zero is a standard convention).
I was thinking that a 10x0 matrix times a 0x0 matrix should be a 10x0
> Hmm, 1.3.0 as of yesterday gives 10 zeros for me as does the one
> updated and compiled about 18:00 CET...
Initially it will give zero. The two operands contain pointers to the R
heap and the BLAS call is treating the objects pointed to as length 10 and
length 1 respectively and multiplying whatever happens to be there.
Initially this will be zeros.
r-devel mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !) To: firstname.lastname@example.org