[sage-support] Re: Strange interaction between sage and numpy

2012-01-08 Thread Dima Pasechnik
It's hard to say whether it's a linear algebra bug, or matrix creation bug. Could you check that the result of A = matrix(QQ,A) actually makes sense? -- To post to this group, send email to sage-support@googlegroups.com To unsubscribe from this group, send email to

Re: [sage-support] Re: Strange interaction between sage and numpy

2012-01-08 Thread Vegard Lima
On Sun, Jan 8, 2012 at 9:12 AM, Dima Pasechnik dimp...@gmail.com wrote: It's hard to say whether it's a linear algebra bug, or matrix creation bug. Could you check that the result of A = matrix(QQ,A) actually makes sense? It looks ok to me: sage: A = matrix(QQ,A) sage: A 10 x 76 dense matrix

[sage-support] 64bit and rank-nullity [Was: Strange interaction between sage and numpy]

2012-01-08 Thread Vegard Lima
Sorry for replying to myself but after a bit of further digging it appears that numpy didn't have anything to do with this. It was just the route by which I came across the following problem: sage: C = random_matrix(ZZ, 10, 80, distribution='uniform') sage: C.ncols() -

Re: [sage-support] Re: Strange interaction between sage and numpy

2012-01-08 Thread Volker Braun
I looked into it a bit and it seems to be an IML bug. Presumably 75 is some cutoff inside IML, though I haven't verified this. You get the right answer if you use a different backend to compute the kernel: sage: matrix(QQ,A).right_kernel(algorithm='generic').dimension()+A.rank() 76 -- To post

Re: [sage-support] 64bit and rank-nullity [Was: Strange interaction between sage and numpy]

2012-01-08 Thread John Cremona
This looks like a very serious bug to me. I can confirm that the bug occurs with 4.8.alpha6 and 5.0.prealpha. John On 8 January 2012 13:31, Vegard Lima vegard.l...@gmail.com wrote: Sorry for replying to myself but after a bit of further digging it appears that numpy didn't have anything to do

[sage-support] Re: 64bit and rank-nullity [Was: Strange interaction between sage and numpy]

2012-01-08 Thread Nils Bruin
On Jan 8, 8:31 am, Vegard Lima vegard.l...@gmail.com wrote: sage: C = random_matrix(ZZ, 10, 80, distribution='uniform') sage: C.ncols() - (C.right_kernel().dimension() + C.rank()) More specifically: sage: C.right_kernel() Free module of degree 80 and rank 80 over Integer Ring Echelon basis

Re: [sage-support] Re: Strange interaction between sage and numpy

2012-01-08 Thread Volker Braun
Just noticed the following: sage: import numpy as np sage: r=10 sage: c=76 sage: A = 2*np.random.randint(2, size=(r,c))-np.ones((r,c),dtype=np.int) sage: A = matrix(QQ,A) sage: A 10 x 76 dense matrix over Integer Ring (type 'print A.str()' to see all of the entries) So matrix(QQ,numpy) actually

[sage-support] Re: 64bit and rank-nullity [Was: Strange interaction between sage and numpy]

2012-01-08 Thread Volker Braun
I made a ticket here: http://trac.sagemath.org/sage_trac/ticket/12280 Hopefully we can fix this at the bug days 35.5 ;-) -- To post to this group, send email to sage-support@googlegroups.com To unsubscribe from this group, send email to sage-support+unsubscr...@googlegroups.com For more