Re: [Tutor] Gamma distribution function

2009-01-13 Thread culpritNr1
> from scipy import stats >>> stats.poisson.pmf(2,1) array(0.18393972058572114) thanks all anyway, culpritNr1 Jervis Whitley wrote: > > On Wed, Jan 14, 2009 at 8:27 AM, culpritNr1 > wrote: > >> >> >> there some kind of random.poisson()? >> >&

Re: [Tutor] Gamma distribution function

2009-01-13 Thread culpritNr1
his functionality is extremely poor. Look >>> help("scipy.stats.distributions.poisson.rvs") Help on method rvs in scipy.stats.distributions.poisson: scipy.stats.distributions.poisson.rvs = rvs(self, *args, **kwds) method of scipy.stats.distributions.poisson_gen instance Do yo

[Tutor] Gamma distribution function

2009-01-13 Thread culpritNr1
Hello All, OK. This time a less trivial question. Is there a function to enable us sample from a Poisson distribution? There is random.uniform, random.normalvariate(), random.expovariate()... Is there some kind of random.poisson()? Thank you, culpritNr1 -- View this message in context

Re: [Tutor] power of 2.718282

2009-01-13 Thread culpritNr1
Thanks Marc and Kent and all. math.exp() is what I was looking for. culpritNr1 -- View this message in context: http://www.nabble.com/power-of-2.718282-tp21441385p21441787.html Sent from the Python - tutor mailing list archive at Nabble.com

[Tutor] power of 2.718282

2009-01-13 Thread culpritNr1
call that computation millions of times. Anything more efficient than 2.718182**10 may be good. Thank you, culpritNr1 -- View this message in context: http://www.nabble.com/power-of-2.718282-tp21441385p21441385.html Sent from the Python - tutor mailing list archive at Nabble.com

Re: [Tutor] casting string to integer in a list of lists

2009-01-09 Thread culpritNr1
#x27; I really meant 'convert'. Sorry, my badness. Thanks for pointing that out. culpritNr1 Kent Johnson wrote: > > On Fri, Jan 9, 2009 at 11:23 AM, culpritNr1 > wrote: >> That is EXACTLY what I was looking for. >> >> Actually, int() does not really work bu

Re: [Tutor] casting string to integer in a list of lists

2009-01-09 Thread culpritNr1
Thanks Daniel, That is EXACTLY what I was looking for. Actually, int() does not really work but this does: [ [line[0], eval(line[1]), eval(line[2])] + line[3:] for line in LoL] Again, thanks. culpritNr1 Daniel Sarmiento-2 wrote: > > I am not an expert and don't know

Re: [Tutor] casting string to integer in a list of lists

2009-01-09 Thread culpritNr1
BP', 'PLoS Biol 6(10): e255'], ['chrX', '162030736', '162030737', 'gnfX.146.867', '67.05'], ['chrX', '164171913', '164171914', 'gnfX.148.995', '70.45']] Do you

Re: [Tutor] casting string to integer in a list of lists

2009-01-09 Thread culpritNr1
to python, my question was if there was an ELEGANT way to do this casting, perhaps as a list comprehension operation. I wondered if the beauty of python could reach that far. I thank you all for your comments, culpritNr1 trias wrote: > > Hi Your, > > I work with genomic data

[Tutor] casting string to integer in a list of lists

2009-01-08 Thread culpritNr1
Hi All, Say I have this nice list of lists: LoL = [['chrX', '160944034', '160944035', 'gnfX.145.788', '63.60'], ['chrX', '161109992', '161109993', 'rs13484104', '63.60'], ['chrX', '161414112', '161414113', 'rs13484105', '63.60'], ['chrX', '161544071', '1615