[SciPy-user] Error in scipy.stats.poisson

John Reid j.reid@mail.cryst.bbk.ac...
Thu Aug 30 07:37:14 CDT 2007


That's strange, I get the following error when I call rv.pmf(2)

---------------------------------------------------------------------------
<type 'exceptions.AttributeError'>        Traceback (most recent call last)

C:\Dev\MyProjects\<ipython console> in <module>()

<type 'exceptions.AttributeError'>: 'rv_frozen' object has no attribute 
'pmf'

I have scipy '0.5.2.1'

Any clues?

John.


Robert Kern wrote:
> John Reid wrote:
>> i was looking for the probability of the given realisation of the random 
>> variable given the frozen parameters. There is no way to achieve this 
>> with the current api AFAICS.
> 
> The PMF does give you that.
> 
> In [1]: from scipy import stats
> 
> In [2]: rv = stats.poisson(4)
> 
> In [3]: rv.pmf(2)
> Out[3]: array(0.14652511110987343)
> 



More information about the SciPy-user mailing list