#3436: random_matrix() with prescribed density buggy
----------------------------+-----------------------------------------------
Reporter: rpw | Owner: was
Type: defect | Status: new
Priority: major | Milestone: sage-4.1.2
Component: linear algebra | Keywords:
Reviewer: | Author:
Merged: |
----------------------------+-----------------------------------------------
Comment(by jhpalmieri):
Replying to [comment:3 jason]:
> Some more examples with sage 4.1. The last few examples show that the
density is about an order of magnitude smaller than what we asked for.
When I tried this, I got answers like the first two: the ratio of
(fraction of nonzero entries) / (density) was about 4/5. This is
consistent with the observation in the ticket description that the
randomize function doesn't check whether the random element is zero: for
integers, the documentation for {{{random_element}}} says that the default
distribution gives {{{Pr(X = 0) = 1/5}}}.
I would try to write a patch for this but pretty much all of the matrix
code is written in Cython, which I don't know, so anything I write would
likely be buggy and slow things down by a factor of 100.
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/3436#comment:4>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica,
and MATLAB
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"sage-trac" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/sage-trac?hl=en
-~----------~----~----~----~------~----~------~--~---