#9770: SphericalDistribution() is not random
-------------------------------+-------------------------------------------
       Reporter:  schilly      |        Owner:  amhou
           Type:  defect       |       Status:  closed
       Priority:  major        |    Milestone:  sage-5.0
      Component:  statistics   |   Resolution:  fixed
       Keywords:               |    Merged in:  sage-5.0.beta9
        Authors:  Douglas      |    Reviewers:  Jason Grout, Jeroen Demeyer
  McNeil                       |  Work issues:
Report Upstream:  N/A          |       Commit:
         Branch:               |     Stopgaps:
   Dependencies:  #9958        |
-------------------------------+-------------------------------------------
Description changed by chapoton:

Old description:

> In the following list {{{l}}}, some elements repeat quite often:
>
> {{{
> sage: l = [ SphericalDistribution(dimension=2).get_random_element() for _
> in range(1000)]
> sage: uniq = []
> sage: for x in l:
>     if x not in uniq:
>         uniq.append(x)
> ....:
> sage: len(uniq)
> 34
> }}}
>
> The output is not random. For example, the first line is repeated ~30
> times in the 1000 lines of output.        It works fine if
> !SphericalDistribution is only instantiated once!

New description:

 In the following list {{{l}}}, some elements repeat quite often:

 {{{
 sage: l = [ SphericalDistribution(dimension=2).get_random_element() for _
 in range(1000)]
 sage: uniq = []
 sage: for x in l:
     if x not in uniq:
         uniq.append(x)
 ....:
 sage: len(uniq)
 34
 }}}

 The output is not random. For example, the first line is repeated ~30
 times in the 1000 lines of output. It works fine if !SphericalDistribution
 is only instantiated once!

--

--
Ticket URL: <http://trac.sagemath.org/ticket/9770#comment:19>
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 unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sage-trac.
For more options, visit https://groups.google.com/d/optout.

Reply via email to