Re: [sage-support] using random seed for sample() function

2011-03-30 Thread tvn
I see, thanks -- was not aware Sage also has its own way to set random seed. -- 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

[sage-support] using random seed for sample() function

2011-03-28 Thread tvn
I'd like to be able to regenerate samples by feeding a seed value to random.seed() , but it seems sample() doesn't use this random seed. Is there a way to do what I want ? Thanks, sage: random.seed(1) sage: random.random() 0.13436424411240122 sage: sample(range(5),2) [4, 1] sage:

Re: [sage-support] using random seed for sample() function

2011-03-28 Thread D. S. McNeil
On Tue, Mar 29, 2011 at 4:00 AM, tvn nguyenthanh...@gmail.com wrote: I'd like to be able to regenerate  samples by feeding a seed value to random.seed()  ,  but it seems sample() doesn't use this random seed.  Is there a way to do what I want ? help(sage.misc.randstate) explains a lot of the