Hi,

I'm writin a Cython module for Sage and at some point I want to
construct a random matrix with a certain density. But supplying the
density as a float to the random_matrix function will always become
0...

for example

%cython
from sage.all import random_matrix,GF
cdef float d
d = <float>1/562
print random_matrix(GF(2),1024,562,density=d).is_zero()

This will always construct a zero matrix because it acts as if density
= 0 ...

What would be the correct way to pass the density argument to the
random_matrix function?

Thanks,

christophe

--~--~---------~--~----~------------~-------~--~----~
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
URLs: http://www.sagemath.org
-~----------~----~----~----~------~----~------~--~---

Reply via email to