Hi,
here's the demo:
<hansl>
loop for (i=2; i>=1; i--)
matrix m = I(i)
m[diag] = ones(i)
print i
m[1:i, 1:i][diag] = ones(i) # fails (only) for i==1
endloop
</hansl>
I suspect that m[1:i, 1:i] is internally treated as scalar and/or that
diag doesn't work with the scalar type. My wish would be that x[diag]
for a scalar just refers to (returns) the scalar itself.
thanks
sven
Show replies by date