[SciPy-user] bug in scipy.stats ?

Hoyt Koepke hoytak@gmail....
Sun Apr 20 22:42:57 CDT 2008


Okay, thanks, that helps --though I kinda think some of this could be
better organized / documented.  I will probably be working a lot with
this module, so maybe I will try to incrementally try to improve it.

--Hoyt

On Sun, Apr 20, 2008 at 11:21 AM, Stéfan van der Walt <stefan@sun.ac.za> wrote:
> Hi Hoyt
>
>
>  On 20/04/2008, Hoyt Koepke <hoytak@gmail.com> wrote:
>  > Been playing around with scipy.stats a little bit and noticed some
>  >  puzzling behavior with the gamma function.  Is this a bug?
>  >
>  >  In [1]: import scipy.stats as st
>  >
>  >  In [2]: g = st.gamma(a=1, b=1)
>  >
>  >  In [3]: g.rvs()
>
>  >From the docstring:
>
>         Alternatively, the object may be called (as a function) to fix
>            the shape, location, and scale parameters returning a
>            "frozen" continuous RV object:
>
>         myrv = gamma(a,loc=0,scale=1)
>             - frozen RV object with the same methods but holding the
>                 given shape, location, and scale fixed
>
>  For the gamma function:
>
>  b = theta = scale
>
>  So you can either do:
>
>  g = st.gamma(a, scale=b)
>  g.rvs(), g.rvs(3) etc.
>
>  or
>
>  g = st.gamma.rvs(a, scale=b)
>
>  Regards
>  Stéfan
>  _______________________________________________
>  SciPy-user mailing list
>  SciPy-user@scipy.org
>  http://projects.scipy.org/mailman/listinfo/scipy-user
>



-- 
+++++++++++++++++++++++++++++++++++
Hoyt Koepke
UBC Department of Computer Science
http://www.cs.ubc.ca/~hoytak/
hoytak@gmail.com
+++++++++++++++++++++++++++++++++++


More information about the SciPy-user mailing list