i'm trying to use the advantage of "+=" when reshaping 2d array to 1d
Can anyone tell me why the following produce different values? (difference in shape and type of the results is not a problem)
a1=indgen(3,7) & for i=0,2 do a2[0,i*2]+=a1[i,*] & print,a2
a1=indgen(3,7) & a2=intarr(3,11) & for i=0,2 do a2[i,i*2]=a1[i,*] & a2=total(a2,1) & print,a2
thanks,
max
|