Re: [sage-support] bug: adding a number to matrix

2015-07-12 Thread John Cremona
On 12 July 2015 at 11:57, avi kaur wrote: > Hello > > I figured out that when we add a number to a matrix, It adds this > number to all the elements at diagonal of matrix. for example: > > sage: a > [ 1 2 2 6] > [ 4 6 2 5] > [56 7 4 8] > [ 8 3 9 6] > sage: a + 2 > [ 3 2 2 6] > [ 4

[sage-support] bug: adding a number to matrix

2015-07-12 Thread avi kaur
Hello I figured out that when we add a number to a matrix, It adds this number to all the elements at diagonal of matrix. for example: sage: a [ 1 2 2 6] [ 4 6 2 5] [56 7 4 8] [ 8 3 9 6] sage: a + 2 [ 3 2 2 6] [ 4 8 2 5] [56 7 6 8] [ 8 3 9 8] As you can see in above examp