Re: [sage-devel] sage matrix

2011-12-01 Thread David Joyner
On Thu, Dec 1, 2011 at 3:17 PM, Chappman wrote: > Hi folks, >            I am currently writing a code which uses a matrix in a > previously defined function written in the same sage window, but I > keep on getting this error message : TypeError: unable to coerce 'sage.matrix.matrix_integer_dense

Re: [sage-devel] sage matrix

2011-12-01 Thread Michael Orlitzky
On 12/01/2011 03:17 PM, Chappman wrote: > > def U(N,M): > U=matrix(ZZ,N*M) > for i in range(N*M): > for j in range(N*M): > U[i,j]=1 > return U ^ This returns a matrix. > def Q(N,M): > ... > Q[i,j]=U(N,M) So this doesn't do what you think it does. --

[sage-devel] sage matrix

2011-12-01 Thread Chappman
Hi folks, I am currently writing a code which uses a matrix in a previously defined function written in the same sage window, but I keep on getting this error message : TypeError: unable to coerce to an integer. thank you for your time. Kind Regards Chappman my code is this : def U(N

Re: [sage-devel] Sage matrix times NumPy array

2009-12-10 Thread William Stein
On Thu, Dec 10, 2009 at 4:54 AM, Dag Sverre Seljebotn wrote: > I have a proposal about M * A, where M is a Sage matrix and A a NumPy > array. The current behaviour appears to be the Kronecker product; I'm > guessing that this is just be a side-effect of Python applying > element-wise __mul__ (if i

Re: [sage-devel] Sage matrix times NumPy array

2009-12-10 Thread Dag Sverre Seljebotn
Dag Sverre Seljebotn wrote: > I have a proposal about M * A, where M is a Sage matrix and A a NumPy > array. The current behaviour appears to be the Kronecker product; I'm > guessing that this is just be a side-effect of Python applying > element-wise __mul__ (if it is intentional and relied upo

[sage-devel] Sage matrix times NumPy array

2009-12-10 Thread Dag Sverre Seljebotn
I have a proposal about M * A, where M is a Sage matrix and A a NumPy array. The current behaviour appears to be the Kronecker product; I'm guessing that this is just be a side-effect of Python applying element-wise __mul__ (if it is intentional and relied upon, this proposal got harder). I do

[sage-devel] sage/matrix/matrix_integer_dense.pyx has own private gmp_randinit_mt()

2007-09-07 Thread mabshoff
Hello, the following issue is related to #519: malb created deallocation routines for the random state used by the Mersenne Twister in the gmp. We used to have many states leaked (about 40 in a usual session), but that has been fixed. To my surprise we still leak one state: ==32085== 2,500 bytes