[SciPy-User] scipy.stats example code with numargs

josef.pktd@gmai... josef.pktd@gmai...
Fri Jan 6 11:17:57 CST 2012


On Fri, Jan 6, 2012 at 12:12 PM, Henry Harpending <harpend@gmail.com> wrote:
> Examples of the use of distributions in scipy documentation start with with
> something like this:
>
>>>> from scipy.stats import truncnorm
>>>> numargs = truncnorm.numargs
>>>> [ a, b ] = [0.9,] * numargs
>>>> rv = truncnorm(a, b)
>
>
> What does this do?  Why 0.9?  In this particular case it seems to make no
> sense: the standard normal truncated between 0.9 and 0.9.  Or am I way off
> base?

You are correct that the numbers in this example don't make any sense
(unless a one-point distribution works).

The problem is that this part of the documentation is generically
generated for all or most distributions.
It is possible to overwrite the generic template but it hasn't been
done for most distributions.

Josef


>
> Thanks, Henry Harpending
>
>
>
>
> _______________________________________________
> SciPy-User mailing list
> SciPy-User@scipy.org
> http://mail.scipy.org/mailman/listinfo/scipy-user
>


More information about the SciPy-User mailing list