On 12/08/2012 05:26 PM, Allin Cottrell wrote: > Sorry: Error, Fail! This "fix" broke things that are stated to > work in the manual (e.g. the ability to use a null matrix as > the basis for either row or column concatenation). I think > that's now put to rights in CVS.
Ah, so that's the reason why my script suddenly failed in a new and unexpected place yesterday! (At least I hope that's the reason.) > > Maybe not for right now, but... I tend to think that we should > not allow the construction of matrices like the one in Sven's > example above -- that is, with zero rows but a positive number > of columns or vice versa. You can have a proper null matrix, > or you can have a matrix with rows > 0 and cols > 0, but not a > chimera. Well, this came up for me when I had the following matrix in a loop with i the loop index: zeros((i-1)*n,n) This produced quite elegant code (if I may say so) without any special casing. The number of rows could be zero (for i=1) in which case the matrix would vanish in that loop iteration, but the number of columns was constant (n>0). So on the principles that Jack argued with, I would say this should be possible in gretl if it's also possible in other languages. I'm pretty certain this is possible in Numerical Python, less certain about other languages. > > As I mentioned, doing "zeros(0,9)" would (silently) produce a > proper null matrix (0x0) until recently. That was not very > satisfactory and for the present I've left in place the "fix" > that produces a 0x9 matrix, but I think that shouldn't stand > for long. Thoughts? See above. I really think it's only necessary to require one dimension to match. thanks, sven
