Hello,

I was doing some computation involving finding nullspace
of a matrix with only \pm 1 entries when right_kernel().basis() started
giving me nullvectors...

Here is a minimal example to reproduce the behaviour:
================
import numpy as np
r=10
c=76
A = 2*np.random.randint(2, size=(r,c))-np.ones((r,c),dtype=np.int)
A = matrix(QQ,A)
print A.right_kernel().dimension()+A.rank()
B = A.right_kernel().basis()
print B[-1]
================
Sage 4.7.2 on 64 bit Fedora 16 linux (compiled from source) gives me:
$ sage minex.sage
86
(0, 0, 0, 0, 0, 0, 0, ... lots of zeros...., 0, 0, 0, 0, 0, 0, 0)

while sage 4.7 on 32 bit osx (downloaded binary) gives:
$ sage minex.sage
76
(0, 0, 0, 0, 0, ..lots of zeros... , 0, 0, 2, -1, 2, 4, -1, 3, -1, -3, 0, -2, 1)

sage 4.7.2 on 64 bit osx behaves as the linux version.

When the number of columns in the matrix is less than
76 I can't reproduce the error, and when the number
of rows is less than 10 it only happens sometimes.
Also removing "dtype=np.int", so that the dtype of the
numpy matrix is the default float64, makes the error go away.

Any ideas what is happening?

Thanks,
-- 
Vegard Lima

-- 
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 options, visit this group at 
http://groups.google.com/group/sage-support
URL: http://www.sagemath.org

Reply via email to